Skip to content

Commit

Permalink
Addressed review comments
Browse files Browse the repository at this point in the history
* type hint updated for find_group_by_id
  • Loading branch information
332fg-raven committed Jan 12, 2024
1 parent db08c70 commit 5dccfb1
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions dcs/country.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from dcs.helicopters import HelicopterType
from dcs.planes import PlaneType
from dcs.unitgroup import VehicleGroup, ShipGroup, PlaneGroup, StaticGroup, HelicopterGroup, FlyingGroup, Group
from typing import List, Dict, Optional, Set, Type
from typing import List, Dict, Optional, Set, Type, Sequence


def find_exact(group_name, find_name):
Expand Down Expand Up @@ -82,11 +82,11 @@ def find_group(self, group_name, search="exact"):
return None

def find_group_by_id(self, group_id: int) -> Optional[Group]:
groups: List = [self.vehicle_group,
self.ship_group,
self.plane_group,
self.helicopter_group,
self.static_group]
groups: List[Sequence[Group]] = [self.vehicle_group,
self.ship_group,
self.plane_group,
self.helicopter_group,
self.static_group]
for search_group in groups:
for group in search_group:
if group.id == group_id:
Expand Down

0 comments on commit 5dccfb1

Please sign in to comment.