From 8f62e2137af65c7397d0ffe5a4303dcdd240895b Mon Sep 17 00:00:00 2001 From: Arborym Date: Tue, 12 Sep 2023 18:14:33 -0400 Subject: [PATCH] Update format --- cogs/moderation.py | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/cogs/moderation.py b/cogs/moderation.py index 166d75e2..bd55440f 100644 --- a/cogs/moderation.py +++ b/cogs/moderation.py @@ -34,13 +34,13 @@ class MessageFingerprint: attachment_urls: list[ str ] # the discord content URLs for each of the message's uploaded attachments - cached_attachment_hashes: set[ - Hash - ] | None = None # populated on the first call to `get_attachment_hashes` + cached_attachment_hashes: ( + set[Hash] | None + ) = None # populated on the first call to `get_attachment_hashes` - content_hash: Hash | None = ( - None # hash of the message body, after being passed through `filter_content` - ) + content_hash: ( + Hash | None + ) = None # hash of the message body, after being passed through `filter_content` # shortcut to build a fingerprint given a message @classmethod @@ -166,11 +166,8 @@ async def is_multipost_of(self, other: MessageFingerprint) -> bool: class Moderation(commands.Cog): def __init__(self, bot: commands.Bot) -> None: self.bot = bot - self.fingerprints: list[ - MessageFingerprint - ] = ( - [] - ) # stores all user messages sent in the last minute (recent messages near the end) + # stores all user messages sent in the last minute (recent messages near the end) + self.fingerprints: list[MessageFingerprint] = [] self.multipost_warnings: dict[ Annotated[int, "Multiposted Message ID"], tuple[