summaryrefslogtreecommitdiffstats
path: root/contrib/python/prompt-toolkit/py3/prompt_toolkit/document.py
diff options
context:
space:
mode:
authorarcadia-devtools <[email protected]>2022-02-12 14:35:15 +0300
committerarcadia-devtools <[email protected]>2022-02-12 14:35:15 +0300
commit46a8b83899dd321edf511c0483f9c479ce2c1bc4 (patch)
treee5debc03beecbd10e7d1bf78c889c8d54e8c4523 /contrib/python/prompt-toolkit/py3/prompt_toolkit/document.py
parentb56bbcc9f63bf31991a8aa118555ce0c12875a74 (diff)
intermediate changes
ref:7c971b97c72bbbcbf889118d39017bd14f99365a
Diffstat (limited to 'contrib/python/prompt-toolkit/py3/prompt_toolkit/document.py')
-rw-r--r--contrib/python/prompt-toolkit/py3/prompt_toolkit/document.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/contrib/python/prompt-toolkit/py3/prompt_toolkit/document.py b/contrib/python/prompt-toolkit/py3/prompt_toolkit/document.py
index f5f24b37b58..19841552054 100644
--- a/contrib/python/prompt-toolkit/py3/prompt_toolkit/document.py
+++ b/contrib/python/prompt-toolkit/py3/prompt_toolkit/document.py
@@ -106,7 +106,7 @@ class Document:
# Check cursor position. It can also be right after the end. (Where we
# insert text.)
assert cursor_position is None or cursor_position <= len(text), AssertionError(
- "cursor_position=%r, len_text=%r" % (cursor_position, len(text))
+ f"cursor_position={cursor_position!r}, len_text={len(text)!r}"
)
# By default, if no cursor position was given, make sure to put the
@@ -137,7 +137,7 @@ class Document:
# assert self._cache
def __repr__(self) -> str:
- return "%s(%r, %r)" % (self.__class__.__name__, self.text, self.cursor_position)
+ return f"{self.__class__.__name__}({self.text!r}, {self.cursor_position!r})"
def __eq__(self, other: object) -> bool:
if not isinstance(other, Document):