From 14b075491e7a29b89cbc62f28e2276eb0d768c7d Mon Sep 17 00:00:00 2001 From: "Y1.Zhao" Date: Fri, 29 Mar 2024 11:57:33 -0400 Subject: [PATCH] use black to format the code --- handlers/__init__.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/handlers/__init__.py b/handlers/__init__.py index 297ff5c..7135bba 100644 --- a/handlers/__init__.py +++ b/handlers/__init__.py @@ -20,13 +20,14 @@ T = TypeVar("T", bound=Callable) BOT_MESSAGE_LENGTH = 4000 + def bot_reply_first(message: Message, who: str, bot: TeleBot) -> Message: - """ Create the first reply message which make user feel the bot is working. """ - return bot.reply_to(message, - f"*{who}* is _thinking_ \.\.\.", - parse_mode="MarkdownV2" + """Create the first reply message which make user feel the bot is working.""" + return bot.reply_to( + message, f"*{who}* is _thinking_ \.\.\.", parse_mode="MarkdownV2" ) + def bot_reply_markdown(reply_id: Message, who: str, text: str, bot: TeleBot) -> None: """ reply the Markdown by take care of the message length. @@ -38,7 +39,7 @@ def bot_reply_markdown(reply_id: Message, who: str, text: str, bot: TeleBot) -> f"*{who}*:\n{telegramify_markdown.convert(text)}", chat_id=reply_id.chat.id, message_id=reply_id.message_id, - parse_mode="MarkdownV2" + parse_mode="MarkdownV2", ) return @@ -48,7 +49,7 @@ def bot_reply_markdown(reply_id: Message, who: str, text: str, bot: TeleBot) -> f"*{who}* \[1/{len(msgs)}\]:\n{telegramify_markdown.convert(msgs[0])}", chat_id=reply_id.chat.id, message_id=reply_id.message_id, - parse_mode="MarkdownV2" + parse_mode="MarkdownV2", ) for i in range(1, len(msgs)): bot.reply_to(