Skip to content

Commit 16a8f8b

Browse files
committed
Fix minor type error.
Comparing self to `0` caused a minor panic in Mypy.
1 parent 8e7dd8b commit 16a8f8b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tcod/event.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ class MouseButtonMask(enum.IntFlag):
279279
"""Forward mouse button is held."""
280280

281281
def __repr__(self) -> str:
282-
if self == 0:
282+
if self.value == 0:
283283
return f"{self.__class__.__name__}(0)"
284284
return "|".join(f"{self.__class__.__name__}.{self.__class__(bit).name}" for bit in self.__class__ if bit & self)
285285

0 commit comments

Comments
 (0)