mirror of
https://github.com/dcs-liberation/dcs_liberation.git
synced 2025-11-10 14:22:26 +00:00
Reformat code with upgraded version of black (#3446)
This commit is contained in:
@@ -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:
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -12,5 +12,4 @@ if TYPE_CHECKING:
|
||||
|
||||
class TheaterCommanderTask(PrimitiveTask[TheaterState]):
|
||||
@abstractmethod
|
||||
def execute(self, coalition: Coalition) -> None:
|
||||
...
|
||||
def execute(self, coalition: Coalition) -> None: ...
|
||||
|
||||
Reference in New Issue
Block a user