mirror of
https://github.com/dcs-liberation/dcs_liberation.git
synced 2025-11-10 14:22:26 +00:00
Disallow partially specified generics.
(cherry picked from commit 69c3d41a8a)
This commit is contained in:
@@ -2,6 +2,8 @@ import itertools
|
||||
import logging
|
||||
from typing import Any
|
||||
|
||||
from dcs.unit import UnitType as DcsUnitType
|
||||
|
||||
from game.dcs.aircrafttype import AircraftType
|
||||
from game.dcs.groundunittype import GroundUnitType
|
||||
from game.dcs.unittype import UnitType
|
||||
@@ -31,7 +33,7 @@ class Base:
|
||||
total += unit_type.price * count
|
||||
return total
|
||||
|
||||
def total_units_of_type(self, unit_type: UnitType) -> int:
|
||||
def total_units_of_type(self, unit_type: UnitType[DcsUnitType]) -> int:
|
||||
return sum(
|
||||
[
|
||||
c
|
||||
|
||||
Reference in New Issue
Block a user