mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Formatting + type annotations
This commit is contained in:
parent
da109146c9
commit
978e3e4de2
@ -135,7 +135,8 @@ class MissionGenerator:
|
|||||||
belligerents = {self.p_country.id, self.e_country.id}
|
belligerents = {self.p_country.id, self.e_country.id}
|
||||||
for country_id in country_dict.keys():
|
for country_id in country_dict.keys():
|
||||||
if country_id not in belligerents:
|
if country_id not in belligerents:
|
||||||
self.mission.coalition["neutrals"].add_country(country_dict[country_id]())
|
c = country_dict[country_id]()
|
||||||
|
self.mission.coalition["neutrals"].add_country(c)
|
||||||
|
|
||||||
def add_airfields_to_unit_map(self) -> None:
|
def add_airfields_to_unit_map(self) -> None:
|
||||||
for control_point in self.game.theater.controlpoints:
|
for control_point in self.game.theater.controlpoints:
|
||||||
|
|||||||
@ -4,7 +4,7 @@ import logging
|
|||||||
import pickle
|
import pickle
|
||||||
import shutil
|
import shutil
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from typing import Optional, TYPE_CHECKING
|
from typing import Optional, TYPE_CHECKING, Any
|
||||||
|
|
||||||
from game.profiling import logged_duration
|
from game.profiling import logged_duration
|
||||||
|
|
||||||
@ -17,7 +17,7 @@ _dcs_saved_game_folder: Optional[str] = None
|
|||||||
# fmt: off
|
# fmt: off
|
||||||
class MigrationUnpickler(pickle.Unpickler):
|
class MigrationUnpickler(pickle.Unpickler):
|
||||||
"""Custom unpickler to migrate campaign save-files for when components have been moved"""
|
"""Custom unpickler to migrate campaign save-files for when components have been moved"""
|
||||||
def find_class(self, module, name):
|
def find_class(self, module: Any, name: str) -> Any:
|
||||||
if name == "NightMissions":
|
if name == "NightMissions":
|
||||||
from game.weather.conditions import NightMissions
|
from game.weather.conditions import NightMissions
|
||||||
return NightMissions
|
return NightMissions
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user