diff options
author | arcadia-devtools <arcadia-devtools@yandex-team.ru> | 2022-02-12 14:35:15 +0300 |
---|---|---|
committer | arcadia-devtools <arcadia-devtools@yandex-team.ru> | 2022-02-12 14:35:15 +0300 |
commit | 46a8b83899dd321edf511c0483f9c479ce2c1bc4 (patch) | |
tree | e5debc03beecbd10e7d1bf78c889c8d54e8c4523 /contrib/python/prompt-toolkit/py3/prompt_toolkit/key_binding/key_bindings.py | |
parent | b56bbcc9f63bf31991a8aa118555ce0c12875a74 (diff) | |
download | ydb-46a8b83899dd321edf511c0483f9c479ce2c1bc4.tar.gz |
intermediate changes
ref:7c971b97c72bbbcbf889118d39017bd14f99365a
Diffstat (limited to 'contrib/python/prompt-toolkit/py3/prompt_toolkit/key_binding/key_bindings.py')
-rw-r--r-- | contrib/python/prompt-toolkit/py3/prompt_toolkit/key_binding/key_bindings.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/contrib/python/prompt-toolkit/py3/prompt_toolkit/key_binding/key_bindings.py b/contrib/python/prompt-toolkit/py3/prompt_toolkit/key_binding/key_bindings.py index 06ca376b09..03bc79ef01 100644 --- a/contrib/python/prompt-toolkit/py3/prompt_toolkit/key_binding/key_bindings.py +++ b/contrib/python/prompt-toolkit/py3/prompt_toolkit/key_binding/key_bindings.py @@ -138,7 +138,7 @@ class Binding: event.app.invalidate() def __repr__(self) -> str: - return "%s(keys=%r, handler=%r)" % ( + return "{}(keys={!r}, handler={!r})".format( self.__class__.__name__, self.keys, self.handler, @@ -359,7 +359,7 @@ class KeyBindings(KeyBindingsBase): self._clear_cache() else: # No key binding found for this function. Raise ValueError. - raise ValueError("Binding not found: %r" % (function,)) + raise ValueError(f"Binding not found: {function!r}") # For backwards-compatibility. add_binding = add @@ -449,7 +449,7 @@ def _parse_key(key: Union[Keys, str]) -> Union[str, Keys]: # Final validation. if len(key) != 1: - raise ValueError("Invalid key: %s" % (key,)) + raise ValueError(f"Invalid key: {key}") return key |