diff options
author | Ethan Furman <ethan@stoneleaf.us> | 2020-09-22 15:01:17 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-22 15:01:17 (GMT) |
commit | ea0711a9f9f207d6d4ca037d90de6ec60db131b0 (patch) | |
tree | 76cd479079dc00ec73dbd52daedffd22c955ecde /Lib/tkinter | |
parent | 557b9a52edc4445cec293f2cc2c268c4f564adcf (diff) | |
download | cpython-ea0711a9f9f207d6d4ca037d90de6ec60db131b0.zip cpython-ea0711a9f9f207d6d4ca037d90de6ec60db131b0.tar.gz cpython-ea0711a9f9f207d6d4ca037d90de6ec60db131b0.tar.bz2 |
bpo-41817: use new StrEnum to ensure all members are strings (GH-22348)
* use new StrEnum to ensure all members are strings
Diffstat (limited to 'Lib/tkinter')
-rw-r--r-- | Lib/tkinter/__init__.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/Lib/tkinter/__init__.py b/Lib/tkinter/__init__.py index 1067ab6..3919397 100644 --- a/Lib/tkinter/__init__.py +++ b/Lib/tkinter/__init__.py @@ -144,12 +144,12 @@ def _splitdict(tk, v, cut_minus=True, conv=None): return dict -class EventType(str, enum.Enum): +class EventType(enum.StrEnum): KeyPress = '2' - Key = KeyPress, + Key = KeyPress KeyRelease = '3' ButtonPress = '4' - Button = ButtonPress, + Button = ButtonPress ButtonRelease = '5' Motion = '6' Enter = '7' @@ -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 |