From 1546340f35356c09fd4ccc2d25437735855e703a Mon Sep 17 00:00:00 2001 From: Evgeny Zinoviev Date: Sun, 6 Nov 2022 21:25:15 +0300 Subject: inverter_bot: remove unused function --- src/inverter_bot.py | 41 ----------------------------------------- 1 file changed, 41 deletions(-) (limited to 'src') diff --git a/src/inverter_bot.py b/src/inverter_bot.py index 2d640f3..7247995 100755 --- a/src/inverter_bot.py +++ b/src/inverter_bot.py @@ -258,47 +258,6 @@ bot.lang.en( ) -def command_usage(command: str, arguments: dict, language='en') -> str: - _strings = { - 'en': LangStrings( - usage='Usage', - arguments='Arguments' - ), - 'ru': LangStrings( - usage='Использование', - arguments='Аргументы' - ) - } - - if language not in _strings: - raise ValueError('unsupported language') - - blocks = [] - argument_names = [] - argument_lines = [] - for k, v in arguments.items(): - argument_names.append(k) - argument_lines.append( - f'{k}: {v}' - ) - - command = f'/{command}' - if argument_names: - command += ' ' + ' '.join(argument_names) - - blocks.append( - f'{_strings[language]["usage"]}\n' - f'{command}' - ) - - if argument_lines: - blocks.append( - f'{_strings[language]["arguments"]}\n' + '\n'.join(argument_lines) - ) - - return '\n\n'.join(blocks) - - def monitor_charging(event: ChargingEvent, **kwargs) -> None: args = [] is_util = False -- cgit v1.2.3