diff options
| author | 2019-12-03 21:07:17 -0800 | |
|---|---|---|
| committer | 2019-12-03 21:34:53 -0800 | |
| commit | 2af995cdf483bf1b8a927768566d9a27cf8a07cf (patch) | |
| tree | 2a619342b1433efdb3c7333c2cf4b0a84ac2cde4 | |
| parent | AntiSpam: replace reupload_attachments with send_attachments from utils (diff) | |
AntiSpam: correct a function annotation
| -rw-r--r-- | bot/cogs/antispam.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/bot/cogs/antispam.py b/bot/cogs/antispam.py index 3a654cfaa..1a60897c9 100644 --- a/bot/cogs/antispam.py +++ b/bot/cogs/antispam.py @@ -105,7 +105,7 @@ class DeletionContext: class AntiSpam(Cog): """Cog that controls our anti-spam measures.""" - def __init__(self, bot: Bot, validation_errors: bool) -> None: + def __init__(self, bot: Bot, validation_errors: Dict[str, str]) -> None: self.bot = bot self.validation_errors = validation_errors role_id = AntiSpamConfig.punishment['role_id'] @@ -265,10 +265,10 @@ class AntiSpam(Cog): await deletion_context.upload_messages(self.bot.user.id, self.mod_log) -def validate_config(rules: Mapping = AntiSpamConfig.rules) -> Dict[str, str]: +def validate_config(_rules: Mapping = AntiSpamConfig.rules) -> Dict[str, str]: """Validates the antispam configs.""" validation_errors = {} - for name, config in rules.items(): + for name, config in _rules.items(): if name not in RULE_FUNCTION_MAPPING: log.error( f"Unrecognized antispam rule `{name}`. " |