From ef9d406c0535ba213c0bb6ee9a71e4e4571af0b8 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 23 Oct 2023 17:47:27 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- tests/test_ptk_shell.py | 3 ++- xontrib_ptk_shell/abbrevs.py | 1 - xontrib_ptk_shell/whole_word_jumping.py | 1 - 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/tests/test_ptk_shell.py b/tests/test_ptk_shell.py index 57d7084..e0005b0 100644 --- a/tests/test_ptk_shell.py +++ b/tests/test_ptk_shell.py @@ -87,7 +87,8 @@ def test_ptk_prompt(line, exp, ptk_shell, capsys): ) def test_ptk_default_append_history(cmd, exp_append_history, ptk_shell, monkeypatch): """Test that running an empty line or a comment does not append to history. - This test is necessary because the prompt-toolkit shell uses a custom _push() method that is different from the base shell's push() method.""" + This test is necessary because the prompt-toolkit shell uses a custom _push() method that is different from the base shell's push() method. + """ inp, out, shell = ptk_shell append_history_calls = [] diff --git a/xontrib_ptk_shell/abbrevs.py b/xontrib_ptk_shell/abbrevs.py index f76af3c..429dd29 100644 --- a/xontrib_ptk_shell/abbrevs.py +++ b/xontrib_ptk_shell/abbrevs.py @@ -115,7 +115,6 @@ def set_cursor_position(buffer, expanded: str) -> None: def custom_keybindings(bindings, **kw): - from prompt_toolkit.filters import EmacsInsertMode, ViInsertMode from xontrib_ptk_shell.key_bindings import carriage_return diff --git a/xontrib_ptk_shell/whole_word_jumping.py b/xontrib_ptk_shell/whole_word_jumping.py index 4176a95..abedafd 100644 --- a/xontrib_ptk_shell/whole_word_jumping.py +++ b/xontrib_ptk_shell/whole_word_jumping.py @@ -25,7 +25,6 @@ def custom_keybindings(bindings): - insert_mode = ViInsertMode() | EmacsInsertMode() # Key bindings for jumping over whole words (everything that's not