summaryrefslogtreecommitdiffstats
path: root/src/prompt_toolkit/input
diff options
context:
space:
mode:
Diffstat (limited to 'src/prompt_toolkit/input')
-rw-r--r--src/prompt_toolkit/input/ansi_escape_sequences.py1
-rw-r--r--src/prompt_toolkit/input/base.py3
-rw-r--r--src/prompt_toolkit/input/typeahead.py1
-rw-r--r--src/prompt_toolkit/input/vt100_parser.py1
-rw-r--r--src/prompt_toolkit/input/win32.py4
5 files changed, 7 insertions, 3 deletions
diff --git a/src/prompt_toolkit/input/ansi_escape_sequences.py b/src/prompt_toolkit/input/ansi_escape_sequences.py
index 5648c66..1fba418 100644
--- a/src/prompt_toolkit/input/ansi_escape_sequences.py
+++ b/src/prompt_toolkit/input/ansi_escape_sequences.py
@@ -10,6 +10,7 @@ mostly Xterm compatible.
Some useful docs:
- Mintty: https://github.com/mintty/mintty/blob/master/wiki/Keycodes.md
"""
+
from __future__ import annotations
from ..keys import Keys
diff --git a/src/prompt_toolkit/input/base.py b/src/prompt_toolkit/input/base.py
index fd1429d..3dcb994 100644
--- a/src/prompt_toolkit/input/base.py
+++ b/src/prompt_toolkit/input/base.py
@@ -1,6 +1,7 @@
"""
Abstraction of CLI Input.
"""
+
from __future__ import annotations
from abc import ABCMeta, abstractmethod, abstractproperty
@@ -116,7 +117,7 @@ class DummyInput(Input):
raise NotImplementedError
def typeahead_hash(self) -> str:
- return "dummy-%s" % id(self)
+ return f"dummy-{id(self)}"
def read_keys(self) -> list[KeyPress]:
return []
diff --git a/src/prompt_toolkit/input/typeahead.py b/src/prompt_toolkit/input/typeahead.py
index a45e7cf..f8faa93 100644
--- a/src/prompt_toolkit/input/typeahead.py
+++ b/src/prompt_toolkit/input/typeahead.py
@@ -31,6 +31,7 @@ To support type ahead, this module will store all the key strokes that were
read too early, so that they can be feed into to the next `prompt()` call or to
the next prompt_toolkit `Application`.
"""
+
from __future__ import annotations
from collections import defaultdict
diff --git a/src/prompt_toolkit/input/vt100_parser.py b/src/prompt_toolkit/input/vt100_parser.py
index 99e2d99..73dbce3 100644
--- a/src/prompt_toolkit/input/vt100_parser.py
+++ b/src/prompt_toolkit/input/vt100_parser.py
@@ -1,6 +1,7 @@
"""
Parser for VT100 input stream.
"""
+
from __future__ import annotations
import re
diff --git a/src/prompt_toolkit/input/win32.py b/src/prompt_toolkit/input/win32.py
index 35e8948..322d7c0 100644
--- a/src/prompt_toolkit/input/win32.py
+++ b/src/prompt_toolkit/input/win32.py
@@ -329,8 +329,8 @@ class ConsoleInputReader:
buffered_high_surrogate = None
for key in key_presses:
is_text = not isinstance(key.key, Keys)
- is_high_surrogate = is_text and "\uD800" <= key.key <= "\uDBFF"
- is_low_surrogate = is_text and "\uDC00" <= key.key <= "\uDFFF"
+ is_high_surrogate = is_text and "\ud800" <= key.key <= "\udbff"
+ is_low_surrogate = is_text and "\udc00" <= key.key <= "\udfff"
if buffered_high_surrogate:
if is_low_surrogate: