Reformat code with upgraded version of black (#3446)

This commit is contained in:
zhexu14
2024-10-05 07:19:39 +10:00
committed by GitHub
parent b008305275
commit 0e9a8ac1a1
58 changed files with 121 additions and 161 deletions

View File

@@ -21,8 +21,7 @@ class FrontLineStanceTask(TheaterCommanderTask, ABC):
@property
@abstractmethod
def stance(self) -> CombatStance:
...
def stance(self) -> CombatStance: ...
@staticmethod
def management_allowed(state: TheaterState) -> bool:
@@ -49,8 +48,7 @@ class FrontLineStanceTask(TheaterCommanderTask, ABC):
@property
@abstractmethod
def have_sufficient_front_line_advantage(self) -> bool:
...
def have_sufficient_front_line_advantage(self) -> bool: ...
@property
def ground_force_balance(self) -> float:

View File

@@ -54,8 +54,7 @@ class PackagePlanningTask(TheaterCommanderTask, Generic[MissionTargetT]):
coalition.ato.add_package(self.package)
@abstractmethod
def propose_flights(self) -> None:
...
def propose_flights(self) -> None: ...
def propose_flight(
self,
@@ -118,9 +117,9 @@ class PackagePlanningTask(TheaterCommanderTask, Generic[MissionTargetT]):
target_ranges: list[
tuple[Union[IadsGroundObject, NavalGroundObject], Distance]
] = []
all_iads: Iterator[
Union[IadsGroundObject, NavalGroundObject]
] = itertools.chain(state.enemy_air_defenses, state.enemy_ships)
all_iads: Iterator[Union[IadsGroundObject, NavalGroundObject]] = (
itertools.chain(state.enemy_air_defenses, state.enemy_ships)
)
for target in all_iads:
distance = meters(target.distance_to(self.target))
if range_type is RangeType.Detection:

View File

@@ -12,5 +12,4 @@ if TYPE_CHECKING:
class TheaterCommanderTask(PrimitiveTask[TheaterState]):
@abstractmethod
def execute(self, coalition: Coalition) -> None:
...
def execute(self, coalition: Coalition) -> None: ...