Skip to content

Commit 4c3c063

Browse files
doronz88jonathanslenders
authored andcommitted
win32: fix flake8 errors
1 parent 27cb5c0 commit 4c3c063

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/prompt_toolkit/input/win32.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)