diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-02-27 10:39:56 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-02-27 10:39:56 +0000 |
commit | eeeaff8afe94b2806a79a02b7c01c912a984a22f (patch) | |
tree | 97983910e3beb2f21c346165f69f3fc57a411b15 /ptpython/key_bindings.py | |
parent | Adding upstream version 3.0.22. (diff) | |
download | ptpython-eeeaff8afe94b2806a79a02b7c01c912a984a22f.tar.xz ptpython-eeeaff8afe94b2806a79a02b7c01c912a984a22f.zip |
Adding upstream version 3.0.23.upstream/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. """ |