Skip to content

Commit 7f95170

Browse files
Prompt-toolkit compatibility fix. Removed 'Callback'.
1 parent 25e1d42 commit 7f95170

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

pymux/main.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
from prompt_toolkit.key_binding.vi_state import InputMode, ViState
1414
from prompt_toolkit.layout.screen import Size
1515
from prompt_toolkit.terminal.vt100_output import Vt100_Output, _get_size
16-
from prompt_toolkit.utils import Callback
1716

1817
from .arrangement import Arrangement, Pane, Window
1918
from .commands.commands import handle_command, call_command_handler
@@ -381,7 +380,7 @@ def on_focus_changed():
381380
use_alternate_screen=True,
382381
style=self.style,
383382
get_title=get_title,
384-
on_invalidate=Callback(lambda cli: self.invalidate()))
383+
on_invalidate=(lambda cli: self.invalidate()))
385384

386385
cli = CommandLineInterface(
387386
application=application,
@@ -392,7 +391,7 @@ def on_focus_changed():
392391
# Synchronize the Vi state with the CLI object.
393392
# (This is stored in the current class, but expected to be in the
394393
# CommandLineInterface.)
395-
def sync_vi_state():
394+
def sync_vi_state(_):
396395
client_state = self.get_client_state(cli)
397396
VI = EditingMode.VI
398397
EMACS = EditingMode.EMACS
@@ -413,7 +412,7 @@ def sync_vi_state():
413412
cli.max_render_postpone_time = .1 # Second.
414413

415414
# Hide message when a key has been pressed.
416-
def key_pressed():
415+
def key_pressed(_):
417416
self.get_client_state(cli).message = None
418417
cli.input_processor.beforeKeyPress += key_pressed
419418

0 commit comments

Comments
 (0)