From e5f7a8891e8efb9aa57b3664a31418b6824b5dbb Mon Sep 17 00:00:00 2001 From: missytake Date: Sun, 8 Oct 2023 08:19:53 +0200 Subject: [PATCH] fixing lint issues --- src/teams_bot/bot.py | 14 +++++++++++--- src/teams_bot/commands.py | 1 + 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/src/teams_bot/bot.py b/src/teams_bot/bot.py index 95021c2..099a7ae 100644 --- a/src/teams_bot/bot.py +++ b/src/teams_bot/bot.py @@ -58,7 +58,11 @@ class RelayPlugin: if arguments[0] == "/help": self.reply(message.chat, help_message(), quote=message) if arguments[0] == "/set_name": - self.reply(message.chat, set_display_name(self.account, arguments[1]), quote=message) + self.reply( + message.chat, + set_display_name(self.account, arguments[1]), + quote=message, + ) if arguments[0] == "/set_avatar": result = set_avatar(self.account, message) self.reply(message.chat, result, quote=message) @@ -92,7 +96,7 @@ class RelayPlugin: def forward_to_outside(self, message: deltachat.Message): """forward an answer to an outsider.""" - bot_localpart = self.account.get_config('addr').split('@')[0] + bot_localpart = self.account.get_config("addr").split("@")[0] title_prefix = f"[{bot_localpart}] " chat_title = message.chat.get_name().split(title_prefix)[1] logging.debug("stripped %s to %s", message.chat.get_name(), chat_title) @@ -102,7 +106,11 @@ class RelayPlugin: outside_chat = chat break else: - logging.debug("No corresponding message in chat %s with name: %s", chat.id, chat.get_name()) + logging.debug( + "No corresponding message in chat %s with name: %s", + chat.id, + chat.get_name(), + ) else: logging.error("Couldn't find the chat with the title: %s", chat_title) return diff --git a/src/teams_bot/commands.py b/src/teams_bot/commands.py index dd4858c..b6bb106 100644 --- a/src/teams_bot/commands.py +++ b/src/teams_bot/commands.py @@ -2,6 +2,7 @@ import logging import deltachat + def help_message() -> str: """Get the help message