Skip to content

Commit

Permalink
fix EventType bases
Browse files Browse the repository at this point in the history
`StrEnum` does not exist in 3.8, so use original `(str, enum.Enum)` bases.
  • Loading branch information
miss-islington committed Sep 22, 2020
1 parent 7bcbb53 commit 6d372ef
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
12 changes: 6 additions & 6 deletions Lib/tkinter/__init__.py
Expand Up @@ -146,10 +146,10 @@ def _splitdict(tk, v, cut_minus=True, conv=None):

class EventType(str, enum.Enum):
KeyPress = '2'
Key = KeyPress,
Key = KeyPress
KeyRelease = '3'
ButtonPress = '4'
Button = ButtonPress,
Button = ButtonPress
ButtonRelease = '5'
Motion = '6'
Enter = '7'
Expand Down Expand Up @@ -180,10 +180,10 @@ class EventType(str, enum.Enum):
Colormap = '32'
ClientMessage = '33' # undocumented
Mapping = '34' # undocumented
VirtualEvent = '35', # undocumented
Activate = '36',
Deactivate = '37',
MouseWheel = '38',
VirtualEvent = '35' # undocumented
Activate = '36'
Deactivate = '37'
MouseWheel = '38'

def __str__(self):
return self.name
Expand Down
@@ -0,0 +1 @@
fix `tkinter.EventType` Enum so all members are strings, and none are tuples

0 comments on commit 6d372ef

Please sign in to comment.