Skip to content

[3.8] bpo-41817: use new StrEnum to ensure all members are strings (GH-22348) #22366

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Sep 22, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions Lib/tkinter/__init__.py
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
fix `tkinter.EventType` Enum so all members are strings, and none are tuples