Skip to content

Commit

Permalink
Undo missing isinstance with pipe operator calls
Browse files Browse the repository at this point in the history
  • Loading branch information
BurnySc2 committed Dec 17, 2024
1 parent c7e6a2e commit c7738c5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion sc2/bot_ai.py
Original file line number Diff line number Diff line change
Expand Up @@ -781,7 +781,7 @@ def structure_type_build_progress(self, structure_type: UnitTypeId | int) -> flo
:param structure_type:
"""
assert isinstance(
structure_type, int | UnitTypeId
structure_type, (int, UnitTypeId)
), f"Needs to be int or UnitTypeId, but was: {type(structure_type)}"
if isinstance(structure_type, int):
structure_type_value: int = structure_type
Expand Down
2 changes: 1 addition & 1 deletion sc2/unit.py
Original file line number Diff line number Diff line change
Expand Up @@ -593,7 +593,7 @@ def in_ability_cast_range(self, ability_id: AbilityId, target: Unit | Point2, bo
)
# For casting abilities on the ground, like queen creep tumor, ravager bile, HT storm
if ability_target_type in {Target.Point.value, Target.PointOrUnit.value} and isinstance(
target, (Point2 | tuple)
target, (Point2, tuple)
):
return (
self._bot_object._distance_pos_to_pos(self.position_tuple, target)
Expand Down

0 comments on commit c7738c5

Please sign in to comment.