Formatted code

This commit is contained in:
n07070
2026-10-14 15:31:08 +02:00
parent 21104d45ab
commit 037af47193

View File

@@ -8,8 +8,10 @@ from mastodon.errors import MastodonError
logger = logging.getLogger(__name__)
class BotListener(StreamListener):
"""A bot class that listens to incoming notifications"""
def __init__(self, mastodon, messages):
super().__init__()
self.mastodon = mastodon
@@ -40,8 +42,11 @@ class BotListener(StreamListener):
visibility="private",
)
logger.debug("Posted welcome %s and follow-up %s",
welcome["id"], collections["id"])
logger.debug(
"Posted welcome %s and follow-up %s",
welcome["id"],
collections["id"],
)
elif kind == "follow":
logger.info("New follow from %s", acct)
@@ -84,5 +89,7 @@ def main():
except MastodonError:
logger.exception("Mastodon streaming error")
raise
if __name__ == "__main__":
main()