mirror of
https://github.com/dcs-liberation/dcs_liberation.git
synced 2025-11-10 14:22:26 +00:00
Pre-emptive Python 3.10 compat.
Iterator is no longer exposed directly in collections, but is in collections.abc.
This commit is contained in:
parent
66c8b96c9a
commit
12f420f50e
@ -3,24 +3,24 @@ from __future__ import annotations
|
||||
import datetime
|
||||
import json
|
||||
import logging
|
||||
from collections import Iterator
|
||||
from collections.abc import Iterator
|
||||
from dataclasses import dataclass
|
||||
from pathlib import Path
|
||||
from typing import Optional, Tuple, Dict, Any
|
||||
from typing import Any, Dict, Optional, Tuple
|
||||
|
||||
from packaging.version import Version
|
||||
import yaml
|
||||
from packaging.version import Version
|
||||
|
||||
from game.profiling import logged_duration
|
||||
from game.theater import (
|
||||
ConflictTheater,
|
||||
CaucasusTheater,
|
||||
NevadaTheater,
|
||||
PersianGulfTheater,
|
||||
NormandyTheater,
|
||||
TheChannelTheater,
|
||||
SyriaTheater,
|
||||
ConflictTheater,
|
||||
MarianaIslandsTheater,
|
||||
NevadaTheater,
|
||||
NormandyTheater,
|
||||
PersianGulfTheater,
|
||||
SyriaTheater,
|
||||
TheChannelTheater,
|
||||
)
|
||||
from game.version import CAMPAIGN_FORMAT_VERSION
|
||||
from .campaignairwingconfig import CampaignAirWingConfig
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
from __future__ import annotations
|
||||
|
||||
from collections import Iterator
|
||||
from collections.abc import Iterator
|
||||
from dataclasses import dataclass
|
||||
|
||||
from game.theater import ControlPoint
|
||||
|
||||
@ -2,16 +2,16 @@ from __future__ import annotations
|
||||
|
||||
import math
|
||||
import operator
|
||||
from collections import Iterator, Iterable
|
||||
from typing import TypeVar, TYPE_CHECKING
|
||||
from collections.abc import Iterable, Iterator
|
||||
from typing import TYPE_CHECKING, TypeVar
|
||||
|
||||
from game.theater import (
|
||||
Airfield,
|
||||
ControlPoint,
|
||||
OffMapSpawn,
|
||||
MissionTarget,
|
||||
Fob,
|
||||
FrontLine,
|
||||
Airfield,
|
||||
MissionTarget,
|
||||
OffMapSpawn,
|
||||
)
|
||||
from game.theater.theatergroundobject import (
|
||||
BuildingGroundObject,
|
||||
@ -19,7 +19,7 @@ from game.theater.theatergroundobject import (
|
||||
NavalGroundObject,
|
||||
)
|
||||
from game.utils import meters, nautical_miles
|
||||
from gen.flights.closestairfields import ObjectiveDistanceCache, ClosestAirfields
|
||||
from gen.flights.closestairfields import ClosestAirfields, ObjectiveDistanceCache
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from game import Game
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
from collections import Iterator
|
||||
from collections.abc import Iterator
|
||||
|
||||
from game.commander.tasks.primitive.aewc import PlanAewc
|
||||
from game.commander.theaterstate import TheaterState
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
from collections import Iterator
|
||||
from collections.abc import Iterator
|
||||
from dataclasses import dataclass
|
||||
|
||||
from game.commander.tasks.primitive.oca import PlanOcaStrike
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
from collections import Iterator
|
||||
from collections.abc import Iterator
|
||||
|
||||
from game.commander.tasks.primitive.strike import PlanStrike
|
||||
from game.commander.theaterstate import TheaterState
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
from collections import Iterator
|
||||
from collections.abc import Iterator
|
||||
|
||||
from game.commander.tasks.primitive.bai import PlanBai
|
||||
from game.commander.theaterstate import TheaterState
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
from collections import Iterator
|
||||
from collections.abc import Iterator
|
||||
from dataclasses import dataclass
|
||||
|
||||
from game.commander.tasks.compound.destroyenemygroundunits import (
|
||||
@ -10,7 +10,7 @@ from game.commander.tasks.compound.reduceenemyfrontlinecapacity import (
|
||||
from game.commander.tasks.primitive.breakthroughattack import BreakthroughAttack
|
||||
from game.commander.theaterstate import TheaterState
|
||||
from game.htn import CompoundTask, Method
|
||||
from game.theater import FrontLine, ControlPoint
|
||||
from game.theater import ControlPoint, FrontLine
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
from collections import Iterator
|
||||
from collections.abc import Iterator
|
||||
from dataclasses import dataclass
|
||||
|
||||
from game.commander.tasks.compound.capturebase import CaptureBase
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
from collections import Iterator
|
||||
from collections.abc import Iterator
|
||||
from dataclasses import dataclass
|
||||
|
||||
from game.commander.tasks.primitive.cas import PlanCas
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
from collections import Iterator
|
||||
from collections.abc import Iterator
|
||||
from dataclasses import dataclass
|
||||
|
||||
from game.commander.tasks.compound.defendbase import DefendBase
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
from collections import Iterator
|
||||
from collections.abc import Iterator
|
||||
from typing import Union
|
||||
|
||||
from game.commander.tasks.primitive.antiship import PlanAntiShip
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
from collections import Iterator
|
||||
from collections.abc import Iterator
|
||||
from dataclasses import dataclass
|
||||
|
||||
from game.commander.tasks.primitive.aggressiveattack import AggressiveAttack
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
from collections import Iterator
|
||||
from collections.abc import Iterator
|
||||
|
||||
from game.commander.tasks.primitive.cas import PlanCas
|
||||
from game.commander.theaterstate import TheaterState
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
from collections import Iterator
|
||||
from collections.abc import Iterator
|
||||
|
||||
from game.commander.tasks.primitive.antishipping import PlanAntiShipping
|
||||
from game.commander.tasks.primitive.convoyinterdiction import PlanConvoyInterdiction
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
from collections import Iterator
|
||||
from collections.abc import Iterator
|
||||
from dataclasses import dataclass
|
||||
|
||||
from game.commander.tasks.compound.attackairinfrastructure import (
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
from collections import Iterator
|
||||
from collections.abc import Iterator
|
||||
|
||||
from game.commander.tasks.primitive.barcap import PlanBarcap
|
||||
from game.commander.theaterstate import TheaterState
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
from collections import Iterator
|
||||
from collections.abc import Iterator
|
||||
from dataclasses import dataclass
|
||||
|
||||
from game.commander.tasks.primitive.strike import PlanStrike
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
from collections import Iterator
|
||||
from collections.abc import Iterator
|
||||
|
||||
from game.commander.tasks.primitive.refueling import PlanRefueling
|
||||
from game.commander.theaterstate import TheaterState
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
from collections import Iterator
|
||||
from collections.abc import Iterator
|
||||
from dataclasses import dataclass
|
||||
|
||||
from game.commander.tasks.compound.aewcsupport import PlanAewcSupport
|
||||
|
||||
@ -3,23 +3,22 @@ from __future__ import annotations
|
||||
import dataclasses
|
||||
import itertools
|
||||
import math
|
||||
from collections import Iterator
|
||||
from collections.abc import Iterator
|
||||
from dataclasses import dataclass
|
||||
from typing import TYPE_CHECKING, Any, Union, Optional
|
||||
from typing import Any, Optional, TYPE_CHECKING, Union
|
||||
|
||||
from game.commander.garrisons import Garrisons
|
||||
from game.commander.objectivefinder import ObjectiveFinder
|
||||
from game.htn import WorldState
|
||||
from game.profiling import MultiEventTracer
|
||||
from game.settings import Settings
|
||||
from game.squadrons import AirWing
|
||||
from game.theater import ControlPoint, FrontLine, MissionTarget, ConflictTheater
|
||||
from game.theater import ConflictTheater, ControlPoint, FrontLine, MissionTarget
|
||||
from game.theater.theatergroundobject import (
|
||||
TheaterGroundObject,
|
||||
NavalGroundObject,
|
||||
IadsGroundObject,
|
||||
VehicleGroupGroundObject,
|
||||
BuildingGroundObject,
|
||||
IadsGroundObject,
|
||||
NavalGroundObject,
|
||||
TheaterGroundObject,
|
||||
VehicleGroupGroundObject,
|
||||
)
|
||||
from game.threatzones import ThreatZones
|
||||
from gen.ground_forces.combat_stance import CombatStance
|
||||
|
||||
@ -3,7 +3,7 @@ from __future__ import annotations
|
||||
import itertools
|
||||
import logging
|
||||
import math
|
||||
from collections import Iterator
|
||||
from collections.abc import Iterator
|
||||
from datetime import date, datetime, timedelta
|
||||
from enum import Enum
|
||||
from typing import Any, List, TYPE_CHECKING, Type, Union, cast
|
||||
|
||||
@ -1,7 +1,8 @@
|
||||
from __future__ import annotations
|
||||
|
||||
from abc import ABC, abstractmethod
|
||||
from collections import Iterator, deque, Sequence
|
||||
from collections import deque
|
||||
from collections.abc import Iterator, Sequence
|
||||
from dataclasses import dataclass
|
||||
from typing import Any, Generic, Optional, TypeVar
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
from collections import Iterator, Iterable
|
||||
from typing import Generic, TypeVar, Optional
|
||||
from collections.abc import Iterable, Iterator
|
||||
from typing import Generic, Optional, TypeVar
|
||||
|
||||
ValueT = TypeVar("ValueT")
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
from collections import Iterator
|
||||
from collections.abc import Iterator
|
||||
from dataclasses import Field, dataclass, field, fields
|
||||
from datetime import timedelta
|
||||
from enum import Enum, unique
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
from __future__ import annotations
|
||||
|
||||
import itertools
|
||||
from collections import Iterator
|
||||
from collections.abc import Iterator
|
||||
from datetime import datetime, timedelta
|
||||
|
||||
from typing_extensions import TYPE_CHECKING
|
||||
|
||||
@ -3,7 +3,7 @@ from __future__ import annotations
|
||||
import itertools
|
||||
import math
|
||||
import random
|
||||
from collections import Iterable
|
||||
from collections.abc import Iterable
|
||||
from dataclasses import dataclass
|
||||
from typing import TypeVar, Union
|
||||
|
||||
|
||||
@ -1,10 +1,10 @@
|
||||
from __future__ import annotations
|
||||
|
||||
import datetime
|
||||
from collections import Iterable
|
||||
from typing import Optional, Iterator, TYPE_CHECKING, Mapping
|
||||
from collections.abc import Iterable
|
||||
from typing import Iterator, Mapping, Optional, TYPE_CHECKING
|
||||
|
||||
from game.data.weapons import Weapon, Pylon, WeaponType
|
||||
from game.data.weapons import Pylon, Weapon, WeaponType
|
||||
from game.dcs.aircrafttype import AircraftType
|
||||
|
||||
if TYPE_CHECKING:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import logging
|
||||
from collections import Iterator
|
||||
from collections.abc import Iterator
|
||||
from contextlib import contextmanager
|
||||
from typing import Type
|
||||
|
||||
|
||||
@ -14,7 +14,7 @@ from dcs.payloads import PayloadDirectories
|
||||
|
||||
from game import Game, VERSION, persistency
|
||||
from game.campaignloader.campaign import Campaign
|
||||
from game.data.weapons import WeaponGroup, Pylon, Weapon
|
||||
from game.data.weapons import Pylon, Weapon, WeaponGroup
|
||||
from game.db import FACTIONS
|
||||
from game.dcs.aircrafttype import AircraftType
|
||||
from game.profiling import logged_duration
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user