mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Fix mypy's complaints
This commit is contained in:
parent
3b745c43eb
commit
f6f1d69048
@ -35,9 +35,10 @@ def weapons_migrator_lib(name: str) -> str:
|
||||
# Splitting this from our own migrations
|
||||
if "KH" in name:
|
||||
return "Kh" + name[2:]
|
||||
migration_map = {}
|
||||
while name in migration_map:
|
||||
name = migration_map[name]
|
||||
# UNCOMMENT BELOW WHEN IT BECOMES APPLICABLE
|
||||
# migration_map = {}
|
||||
# while name in migration_map:
|
||||
# name = migration_map[name]
|
||||
return name
|
||||
|
||||
|
||||
|
||||
@ -64,8 +64,8 @@ class Migrator:
|
||||
for p in c.ato.packages:
|
||||
try_set_attr(p, "custom_name")
|
||||
try_set_attr(p, "frequency")
|
||||
if self.is_liberation and isinstance(p.time_over_target, datetime):
|
||||
p.time_over_target = (
|
||||
if self.is_liberation and isinstance(p.time_over_target, datetime): # type: ignore
|
||||
p.time_over_target = ( # type: ignore
|
||||
p.time_over_target - self.game.conditions.start_time
|
||||
)
|
||||
|
||||
|
||||
@ -18,7 +18,7 @@ _dcs_saved_game_folder: Optional[str] = None
|
||||
|
||||
# fmt: off
|
||||
class DummyObject:
|
||||
def __setstate__(self, state):
|
||||
def __setstate__(self, state: dict[str, Any]) -> None:
|
||||
self.__dict__.update(state)
|
||||
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user