From 8a95be7473b1825b59b698ff0c954df71477fc97 Mon Sep 17 00:00:00 2001 From: Raffson Date: Sun, 2 Apr 2023 22:14:49 +0200 Subject: [PATCH] Fix mypy complaining about something that was already covered -_- --- game/theater/start_generator.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/game/theater/start_generator.py b/game/theater/start_generator.py index b15b5cb4..d66cfbe5 100644 --- a/game/theater/start_generator.py +++ b/game/theater/start_generator.py @@ -310,6 +310,7 @@ class AirbaseGroundObjectGenerator(ControlPointGroundObjectGenerator): and all([u in self.faction.accessible_units for u in fg.units]) ) if valid_fg: + assert fg for layout in fg.layouts: for lg in layout.groups: for ug in lg.unit_groups: @@ -317,8 +318,7 @@ class AirbaseGroundObjectGenerator(ControlPointGroundObjectGenerator): for g in self.faction.ground_units: if g.unit_class in ug.unit_classes: fg.units.append(g) - unit_group = fg - assert fg + unit_group: Optional[ForceGroup] = fg self.armed_forces.add_or_update_force_group(fg) else: if fg and not valid_fg: