From 60fa42978f4ef661fb5d1e69a262f79d7b5c7366 Mon Sep 17 00:00:00 2001 From: Christian Heller Date: Mon, 15 Sep 2025 09:14:42 +0200 Subject: [PATCH] Remove trailing whitespace from /help output. --- ircplom/testing.py | 12 ++++++------ ircplom/tui_base.py | 6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/ircplom/testing.py b/ircplom/testing.py index 56afde7..4eeb6d5 100644 --- a/ircplom/testing.py +++ b/ircplom/testing.py @@ -13,14 +13,14 @@ _PLAYBOOK: tuple[str, ...] = ( '> /help', '0 # commands available in this window:', '0 # /connect HOST_PORT [NICKNAME_PW] [REALNAME]', - '0 # /help ', - '0 # /list ', - '0 # /prompt_enter ', - '0 # /quit ', + '0 # /help', + '0 # /list', + '0 # /prompt_enter', + '0 # /quit', '0 # /window TOWARDS', '0 # /window.history.scroll DIRECTION', - '0 # /window.paste ', - '0 # /window.prompt.backspace ', + '0 # /window.paste', + '0 # /window.prompt.backspace', '0 # /window.prompt.move_cursor DIRECTION', '0 # /window.prompt.scroll DIRECTION', '> /list', diff --git a/ircplom/tui_base.py b/ircplom/tui_base.py index 41406b8..8fbea79 100644 --- a/ircplom/tui_base.py +++ b/ircplom/tui_base.py @@ -577,13 +577,13 @@ class BaseTui(QueueMixin): self._log('commands available in this window:') to_log = [] for cmd_name, cmd_data in self._commands.items(): - args = [] + to_print = [cmd_name] for idx, arg in enumerate(cmd_data[2]): arg = arg.upper() if idx >= cmd_data[1]: arg = f'[{arg}]' - args += [arg] - to_log += [f'{cmd_name} {" ".join(args)}'] + to_print += [arg] + to_log += [' '.join(to_print)] for item in sorted(to_log): self._log(f' /{item}') -- 2.30.2