mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Fix mypy regressions.
This commit is contained in:
parent
9f078e1483
commit
5d4fccd438
@ -4,7 +4,7 @@ import logging
|
||||
import math
|
||||
import pickle
|
||||
import random
|
||||
from typing import Any, Dict, List, Optional
|
||||
from typing import Any, Dict, Iterable, Optional
|
||||
|
||||
from dcs.mapping import Point
|
||||
from dcs.task import CAP, CAS, PinpointStrike
|
||||
@ -632,7 +632,7 @@ class AirbaseGroundObjectGenerator(ControlPointGroundObjectGenerator):
|
||||
self.generate_aa_at(position)
|
||||
|
||||
def generate_aa_at(self, position: Point,
|
||||
filter_names: Optional[List[str]] = None) -> None:
|
||||
filter_names: Optional[Iterable[str]] = None) -> None:
|
||||
group_id = self.game.next_group_id()
|
||||
|
||||
g = SamGroundObject(namegen.random_objective_name(), group_id,
|
||||
|
||||
@ -1,10 +1,10 @@
|
||||
import random
|
||||
from typing import List, Optional, Type
|
||||
from typing import Iterable, List, Optional, Type
|
||||
|
||||
from dcs.unitgroup import VehicleGroup
|
||||
from dcs.vehicles import AirDefence
|
||||
|
||||
from game import Game, db
|
||||
from game import Game
|
||||
from game.factions.faction import Faction
|
||||
from game.theater import TheaterGroundObject
|
||||
from game.theater.theatergroundobject import SamGroundObject
|
||||
@ -151,7 +151,8 @@ EWR_MAP = {
|
||||
|
||||
def get_faction_possible_sams_generator(
|
||||
faction: Faction,
|
||||
filter_names: Optional[List[str]] = None) -> List[Type[GroupGenerator]]:
|
||||
filter_names: Optional[Iterable[str]] = None
|
||||
) -> List[Type[GroupGenerator]]:
|
||||
"""
|
||||
Return the list of possible SAM generator for the given faction
|
||||
:param faction: Faction name to search units for
|
||||
@ -171,7 +172,7 @@ def get_faction_possible_ewrs_generator(faction: Faction) -> List[Type[GroupGene
|
||||
|
||||
def generate_anti_air_group(
|
||||
game: Game, ground_object: TheaterGroundObject, faction: Faction,
|
||||
filter_names: Optional[List[str]] = None) -> Optional[VehicleGroup]:
|
||||
filter_names: Optional[Iterable[str]] = None) -> Optional[VehicleGroup]:
|
||||
"""
|
||||
This generate a SAM group
|
||||
:param game: The Game.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user