diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-02-27 10:40:00 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-02-27 10:40:00 +0000 |
commit | e0719babdc8744144449c81fac14ba7bbf21446f (patch) | |
tree | 36e17925ec537746a9bb1ce7035b216529a957a5 /ptpython/key_bindings.py | |
parent | Releasing debian version 3.0.22-2. (diff) | |
download | ptpython-e0719babdc8744144449c81fac14ba7bbf21446f.tar.xz ptpython-e0719babdc8744144449c81fac14ba7bbf21446f.zip |
Merging upstream version 3.0.23.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'ptpython/key_bindings.py')
-rw-r--r-- | ptpython/key_bindings.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/ptpython/key_bindings.py b/ptpython/key_bindings.py index 147a321..d7bb575 100644 --- a/ptpython/key_bindings.py +++ b/ptpython/key_bindings.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from typing import TYPE_CHECKING from prompt_toolkit.application import get_app @@ -47,7 +49,7 @@ def tab_should_insert_whitespace() -> bool: return bool(b.text and (not before_cursor or before_cursor.isspace())) -def load_python_bindings(python_input: "PythonInput") -> KeyBindings: +def load_python_bindings(python_input: PythonInput) -> KeyBindings: """ Custom key bindings. """ @@ -157,7 +159,7 @@ def load_python_bindings(python_input: "PythonInput") -> KeyBindings: Behaviour of the Enter key. Auto indent after newline/Enter. - (When not in Vi navigaton mode, and when multiline is enabled.) + (When not in Vi navigation mode, and when multiline is enabled.) """ b = event.current_buffer empty_lines_required = python_input.accept_input_on_enter or 10000 @@ -218,7 +220,7 @@ def load_python_bindings(python_input: "PythonInput") -> KeyBindings: return bindings -def load_sidebar_bindings(python_input: "PythonInput") -> KeyBindings: +def load_sidebar_bindings(python_input: PythonInput) -> KeyBindings: """ Load bindings for the navigation in the sidebar. """ @@ -273,7 +275,7 @@ def load_sidebar_bindings(python_input: "PythonInput") -> KeyBindings: return bindings -def load_confirm_exit_bindings(python_input: "PythonInput") -> KeyBindings: +def load_confirm_exit_bindings(python_input: PythonInput) -> KeyBindings: """ Handle yes/no key presses when the exit confirmation is shown. """ |