diff --git a/simplebot_mastodon/__init__.py b/simplebot_mastodon/__init__.py index 209ac02..9834405 100644 --- a/simplebot_mastodon/__init__.py +++ b/simplebot_mastodon/__init__.py @@ -441,7 +441,9 @@ def dm_cmd(bot: DeltaBot, payload: str, message: Message, replies: Replies) -> N ) if dmchat: chat = bot.get_chat(dmchat.chat_id) - replies.add(text="❌ Chat already exists, send messages here", chat=chat) + replies.add( + text="❌ Chat already exists, send messages here", chat=chat + ) return chat = bot.create_group( user.acct, bot.get_chat(acc.notifications).get_contacts() @@ -514,9 +516,11 @@ def open_cmd(bot: DeltaBot, payload: str, message: Message, replies: Replies) -> context["ancestors"] + [masto.status(payload)] + context["descendants"] ) replies.add( - text=TOOT_SEP.join(toots2texts(bot, toots)) - if toots - else "❌ Nothing found", + text=( + TOOT_SEP.join(toots2texts(bot, toots)) + if toots + else "❌ Nothing found" + ), quote=message, ) else: @@ -565,8 +569,7 @@ def mute_cmd(payload: str, message: Message, replies: Replies) -> None: def unmute_cmd(payload: str, message: Message, replies: Replies) -> None: if payload: replies.add( - text=account_action("account_unmute", payload, message) - or "✔️ User unmuted", + text=account_action("account_unmute", payload, message) or "✔️ User unmuted", quote=message, ) return diff --git a/simplebot_mastodon/migrations.py b/simplebot_mastodon/migrations.py index 7f1d163..797bdd4 100644 --- a/simplebot_mastodon/migrations.py +++ b/simplebot_mastodon/migrations.py @@ -1,4 +1,5 @@ """Database migrations""" + import os import sqlite3 diff --git a/simplebot_mastodon/util.py b/simplebot_mastodon/util.py index a5813dd..0e1faf0 100644 --- a/simplebot_mastodon/util.py +++ b/simplebot_mastodon/util.py @@ -94,7 +94,9 @@ def toot2reply(prefix: str, toot: AttribAccessDict, notification: bool = False) if toot.type == "reblog": text = f"🔁 {_get_name(toot.account)} boosted your toot. ({timestamp})\n\n" elif toot.type == "favourite": - text = f"⭐ {_get_name(toot.account)} favorited your toot. ({timestamp})\n\n" + text = ( + f"⭐ {_get_name(toot.account)} favorited your toot. ({timestamp})\n\n" + ) elif toot.type == "follow": return {"text": f"👤 {_get_name(toot.account)} followed you. ({timestamp})"} elif toot.type == "mention":