File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -314,10 +314,10 @@ def _get_keys(
314314
315315 # Process if this is a key event. (We also have mouse, menu and
316316 # focus events.)
317- if type (ev ) == KEY_EVENT_RECORD and ev .KeyDown :
317+ if isinstance (ev , KEY_EVENT_RECORD ) and ev .KeyDown :
318318 yield from self ._event_to_key_presses (ev )
319319
320- elif type (ev ) == MOUSE_EVENT_RECORD :
320+ elif isinstance (ev , MOUSE_EVENT_RECORD ) :
321321 yield from self ._handle_mouse (ev )
322322
323323 @staticmethod
@@ -379,7 +379,7 @@ def _event_to_key_presses(self, ev: KEY_EVENT_RECORD) -> list[KeyPress]:
379379 """
380380 For this `KEY_EVENT_RECORD`, return a list of `KeyPress` instances.
381381 """
382- assert type (ev ) == KEY_EVENT_RECORD and ev .KeyDown
382+ assert isinstance (ev , KEY_EVENT_RECORD ) and ev .KeyDown
383383
384384 result : KeyPress | None = None
385385
You can’t perform that action at this time.
0 commit comments