Skip to content

Commit

Permalink
Fix typing
Browse files Browse the repository at this point in the history
  • Loading branch information
zhexu14 committed Oct 5, 2024
1 parent 9adf2fa commit eefff9d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions game/callsigns/callsigngenerator.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,7 @@ def group_name(self) -> str:
else:
return str(self.lead_callsign())

def pydcs_dict(self, country: str) -> dict[Any, Any] | str:
if self.name is None:
return str(self)
def pydcs_dict(self, country: str) -> dict[Any, Any]:
country_obj = countries_by_name[country]()
for category in CallsignCategory:
if category in country_obj.callsign:
Expand Down
2 changes: 1 addition & 1 deletion game/missiongenerator/aircraft/flightgroupconfigurator.py
Original file line number Diff line number Diff line change
Expand Up @@ -281,5 +281,5 @@ def set_callsigns(self) -> None:
if (
unit_callsign.name is None
): # pydcs needs unit.callsign to be set for eastern callsigns
unit.callsign = str(unit_callsign)
unit.callsign = str(unit_callsign) # type: ignore
unit.callsign_dict = unit_callsign.pydcs_dict(country=self.flight.country)

0 comments on commit eefff9d

Please sign in to comment.