Skip to content

Commit aabd95b

Browse files
Typing fix in src/prompt_toolkit/input/win32.py.
1 parent 8d0fb00 commit aabd95b

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

src/prompt_toolkit/input/win32.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -104,11 +104,8 @@ def detach(self) -> ContextManager[None]:
104104
def read_keys(self) -> list[KeyPress]:
105105
return list(self.console_input_reader.read())
106106

107-
def flush_keys(self) -> None:
108-
if self._use_virtual_terminal_input:
109-
return self.console_input_reader.flush_keys()
110-
else:
111-
return []
107+
def flush_keys(self) -> list[KeyPress]:
108+
return self.console_input_reader.flush_keys()
112109

113110
@property
114111
def closed(self) -> bool:
@@ -298,6 +295,10 @@ def read(self) -> Iterable[KeyPress]:
298295
else:
299296
yield from all_keys
300297

298+
def flush_keys(self) -> list[KeyPress]:
299+
# Method only needed for structural compatibility with `Vt100ConsoleInputReader`.
300+
return []
301+
301302
def _insert_key_data(self, key_press: KeyPress) -> KeyPress:
302303
"""
303304
Insert KeyPress data, for vt100 compatibility.

0 commit comments

Comments
 (0)