Skip to content

Commit

Permalink
Addressed review comments
Browse files Browse the repository at this point in the history
* Updated type hints on PictureTo* Actions
  • Loading branch information
332fg-raven committed Jan 12, 2024
1 parent a59c67c commit 8cd2352
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions dcs/action.py
Original file line number Diff line number Diff line change
Expand Up @@ -1802,7 +1802,7 @@ class HorzAlignment(Enum):
Center = "1"
Right = "2"

def __eq__(self, other) -> bool:
def __eq__(self, other: Any) -> bool:
if isinstance(other, str):
return self.value == other
return self == other
Expand All @@ -1812,7 +1812,7 @@ class VertAlignment(Enum):
Center = "1"
Bottom = "2"

def __eq__(self, other) -> bool:
def __eq__(self, other: Any) -> bool:
if isinstance(other, str):
return self.value == other
return self == other
Expand All @@ -1821,7 +1821,7 @@ class SizeUnits(Enum):
OriginalSize = "0"
WindowSize = "1"

def __eq__(self, other) -> bool:
def __eq__(self, other: Any) -> bool:
if isinstance(other, str):
return self.value == other
return self == other
Expand Down Expand Up @@ -1854,7 +1854,7 @@ def dict(self) -> Dict[str, Any]:
d["size"] = self.size
return d

def __eq__(self, other) -> bool:
def __eq__(self, other: Any) -> bool:
if isinstance(other, self.__class__):
return self.__dict__ == other.__dict__
return False
Expand All @@ -1875,7 +1875,7 @@ def __init__(self, file_res_key: ResourceKey, seconds: int,
horz_alignment, vert_alignment, size, size_units]

@classmethod
def create_from_dict(cls, d, mission) -> "PictureToAll":
def create_from_dict(cls, d: Dict[str, Any], mission: Mission) -> PictureToAll:
return cls(ResourceKey(d["file"]), d["seconds"], d["clearview"], d["start_delay"],
d["horzAlignment"], d["vertAlignment"], d["size"], d["size_units"])

Expand All @@ -1896,7 +1896,7 @@ def __init__(self, coalition: Coalition, file_res_key: ResourceKey, seconds: int
start_delay, horz_alignment, vert_alignment, size, size_units]

@classmethod
def create_from_dict(cls, d, mission) -> "PictureToCoalition":
def create_from_dict(cls, d: Dict[str, Any], mission: Mission) -> PictureToCoalition:
return cls(d["coalitionlist"], ResourceKey(d["file"]), d["seconds"], d["clearview"], d["start_delay"],
d["horzAlignment"], d["vertAlignment"], d["size"], d["size_units"])

Expand Down

0 comments on commit 8cd2352

Please sign in to comment.