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
|
# Splitting this from our own migrations
|
||||||
if "KH" in name:
|
if "KH" in name:
|
||||||
return "Kh" + name[2:]
|
return "Kh" + name[2:]
|
||||||
migration_map = {}
|
# UNCOMMENT BELOW WHEN IT BECOMES APPLICABLE
|
||||||
while name in migration_map:
|
# migration_map = {}
|
||||||
name = migration_map[name]
|
# while name in migration_map:
|
||||||
|
# name = migration_map[name]
|
||||||
return name
|
return name
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -64,8 +64,8 @@ class Migrator:
|
|||||||
for p in c.ato.packages:
|
for p in c.ato.packages:
|
||||||
try_set_attr(p, "custom_name")
|
try_set_attr(p, "custom_name")
|
||||||
try_set_attr(p, "frequency")
|
try_set_attr(p, "frequency")
|
||||||
if self.is_liberation and isinstance(p.time_over_target, datetime):
|
if self.is_liberation and isinstance(p.time_over_target, datetime): # type: ignore
|
||||||
p.time_over_target = (
|
p.time_over_target = ( # type: ignore
|
||||||
p.time_over_target - self.game.conditions.start_time
|
p.time_over_target - self.game.conditions.start_time
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@ -18,7 +18,7 @@ _dcs_saved_game_folder: Optional[str] = None
|
|||||||
|
|
||||||
# fmt: off
|
# fmt: off
|
||||||
class DummyObject:
|
class DummyObject:
|
||||||
def __setstate__(self, state):
|
def __setstate__(self, state: dict[str, Any]) -> None:
|
||||||
self.__dict__.update(state)
|
self.__dict__.update(state)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user