From 037af47193c141f77d546b4f0ef7bf236ecfdd30 Mon Sep 17 00:00:00 2001 From: n07070 Date: Wed, 14 Oct 2026 15:31:08 +0200 Subject: [PATCH] Formatted code --- src/main.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/main.py b/src/main.py index 6fd37ac..3687d7f 100644 --- a/src/main.py +++ b/src/main.py @@ -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()