File tree 1 file changed +3
-3
lines changed 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -314,10 +314,10 @@ def _get_keys(
314
314
315
315
# Process if this is a key event. (We also have mouse, menu and
316
316
# focus events.)
317
- if type (ev ) == KEY_EVENT_RECORD and ev .KeyDown :
317
+ if isinstance (ev , KEY_EVENT_RECORD ) and ev .KeyDown :
318
318
yield from self ._event_to_key_presses (ev )
319
319
320
- elif type (ev ) == MOUSE_EVENT_RECORD :
320
+ elif isinstance (ev , MOUSE_EVENT_RECORD ) :
321
321
yield from self ._handle_mouse (ev )
322
322
323
323
@staticmethod
@@ -379,7 +379,7 @@ def _event_to_key_presses(self, ev: KEY_EVENT_RECORD) -> list[KeyPress]:
379
379
"""
380
380
For this `KEY_EVENT_RECORD`, return a list of `KeyPress` instances.
381
381
"""
382
- assert type (ev ) == KEY_EVENT_RECORD and ev .KeyDown
382
+ assert isinstance (ev , KEY_EVENT_RECORD ) and ev .KeyDown
383
383
384
384
result : KeyPress | None = None
385
385
You can’t perform that action at this time.
0 commit comments