Skip to content

Commit

Permalink
Fix #62 by explicitly returning python bool
Browse files Browse the repository at this point in the history
  • Loading branch information
BurnySc2 committed Aug 30, 2020
1 parent 2725786 commit cac70d7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion sc2/position.py
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,9 @@ def __abs__(self) -> float:
return math.hypot(self.x, self.y)

def __bool__(self) -> bool:
return self.x != 0 or self.y != 0
if self.x != 0 or self.y != 0:
return True
return False

def __mul__(self, other: Union[int, float, Point2]) -> Point2:
try:
Expand Down

0 comments on commit cac70d7

Please sign in to comment.