diff options
author | robot-piglet <robot-piglet@yandex-team.com> | 2024-06-14 17:46:04 +0300 |
---|---|---|
committer | robot-piglet <robot-piglet@yandex-team.com> | 2024-06-14 18:00:06 +0300 |
commit | 85f6451860166545196ffa2950aa68be2363733b (patch) | |
tree | 4443b7b2465bda4bdc3589314f258329ecaedb38 /contrib/python/prompt-toolkit/py3/prompt_toolkit/input | |
parent | fa297dd4855aef4bd79faebb48120708d2f9249d (diff) | |
download | ydb-85f6451860166545196ffa2950aa68be2363733b.tar.gz |
Intermediate changes
Diffstat (limited to 'contrib/python/prompt-toolkit/py3/prompt_toolkit/input')
5 files changed, 7 insertions, 3 deletions
diff --git a/contrib/python/prompt-toolkit/py3/prompt_toolkit/input/ansi_escape_sequences.py b/contrib/python/prompt-toolkit/py3/prompt_toolkit/input/ansi_escape_sequences.py index 5648c6646a..1fba418b73 100644 --- a/contrib/python/prompt-toolkit/py3/prompt_toolkit/input/ansi_escape_sequences.py +++ b/contrib/python/prompt-toolkit/py3/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/contrib/python/prompt-toolkit/py3/prompt_toolkit/input/base.py b/contrib/python/prompt-toolkit/py3/prompt_toolkit/input/base.py index fd1429df2e..3dcb994bd9 100644 --- a/contrib/python/prompt-toolkit/py3/prompt_toolkit/input/base.py +++ b/contrib/python/prompt-toolkit/py3/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/contrib/python/prompt-toolkit/py3/prompt_toolkit/input/typeahead.py b/contrib/python/prompt-toolkit/py3/prompt_toolkit/input/typeahead.py index a45e7cf50b..f8faa93289 100644 --- a/contrib/python/prompt-toolkit/py3/prompt_toolkit/input/typeahead.py +++ b/contrib/python/prompt-toolkit/py3/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/contrib/python/prompt-toolkit/py3/prompt_toolkit/input/vt100_parser.py b/contrib/python/prompt-toolkit/py3/prompt_toolkit/input/vt100_parser.py index 99e2d99c58..73dbce3d83 100644 --- a/contrib/python/prompt-toolkit/py3/prompt_toolkit/input/vt100_parser.py +++ b/contrib/python/prompt-toolkit/py3/prompt_toolkit/input/vt100_parser.py @@ -1,6 +1,7 @@ """ Parser for VT100 input stream. """ + from __future__ import annotations import re diff --git a/contrib/python/prompt-toolkit/py3/prompt_toolkit/input/win32.py b/contrib/python/prompt-toolkit/py3/prompt_toolkit/input/win32.py index 35e8948d22..322d7c0d72 100644 --- a/contrib/python/prompt-toolkit/py3/prompt_toolkit/input/win32.py +++ b/contrib/python/prompt-toolkit/py3/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: |