From b5d0036a30c9323098cf8ae788057c8b54c67dc4 Mon Sep 17 00:00:00 2001 From: leo <3181538941@qq.com> Date: Sun, 21 May 2023 14:54:55 +0800 Subject: [PATCH] To optimize the initialization writing with `result` list Revised `botton` spelling mistakes with `bottom` --- mycli/clitoolbar.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/mycli/clitoolbar.py b/mycli/clitoolbar.py index 24d11083..52b6ee45 100644 --- a/mycli/clitoolbar.py +++ b/mycli/clitoolbar.py @@ -7,8 +7,7 @@ def create_toolbar_tokens_func(mycli, show_fish_help): """Return a function that generates the toolbar tokens.""" def get_toolbar_tokens(): - result = [] - result.append(('class:bottom-toolbar', ' ')) + result = [('class:bottom-toolbar', ' ')] if mycli.multi_line: delimiter = special.get_current_delimiter() @@ -26,7 +25,7 @@ def get_toolbar_tokens(): '[F3] Multiline: OFF ')) if mycli.prompt_app.editing_mode == EditingMode.VI: result.append(( - 'class:botton-toolbar.on', + 'class:bottom-toolbar.on', 'Vi-mode ({})'.format(_get_vi_mode()) ))