Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 16a8f8b

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

File tree

Expand file treeCollapse file tree

1 file changed

+1
-1
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+1
-1
lines changed

‎tcod/event.py

Copy file name to clipboardExpand all lines: tcod/event.py
+1-1Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.