From 6dc655898df34ad424dfc467a8b276fdf31bd791 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 5 Jun 2024 06:45:15 +0200 Subject: Merging upstream version 3.0.46. Signed-off-by: Daniel Baumann --- src/prompt_toolkit/key_binding/bindings/named_commands.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/prompt_toolkit/key_binding/bindings/named_commands.py') diff --git a/src/prompt_toolkit/key_binding/bindings/named_commands.py b/src/prompt_toolkit/key_binding/bindings/named_commands.py index d836116..8ea8dd0 100644 --- a/src/prompt_toolkit/key_binding/bindings/named_commands.py +++ b/src/prompt_toolkit/key_binding/bindings/named_commands.py @@ -3,6 +3,7 @@ Key bindings which are also known by GNU Readline by the given names. See: http://www.delorie.com/gnu/docs/readline/rlman_13.html """ + from __future__ import annotations from typing import Callable, TypeVar, Union, cast @@ -58,7 +59,7 @@ def get_by_name(name: str) -> Binding: try: return _readline_commands[name] except KeyError as e: - raise KeyError("Unknown Readline command: %r" % name) from e + raise KeyError(f"Unknown Readline command: {name!r}") from e # -- cgit v1.2.3