diff options
author | 2022-07-25 23:50:19 +0100 | |
---|---|---|
committer | 2022-08-14 19:43:53 +0100 | |
commit | ab7aafb5353c03efb6dbade30cf7ad8754c7a5aa (patch) | |
tree | a80e42e73c3f3547e28b2f6cfda90701d6fe1b01 | |
parent | Stop creating futures in tests with no event loop running (diff) |
noqa false-positive B023 instances
This was a new lint rule added in the latest bugbear.
-rw-r--r-- | bot/exts/backend/sync/_syncers.py | 4 | ||||
-rw-r--r-- | bot/exts/filters/antispam.py | 2 | ||||
-rw-r--r-- | tox.ini | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/bot/exts/backend/sync/_syncers.py b/bot/exts/backend/sync/_syncers.py index 799137cb9..8976245e3 100644 --- a/bot/exts/backend/sync/_syncers.py +++ b/bot/exts/backend/sync/_syncers.py @@ -154,8 +154,8 @@ class UserSyncer(Syncer): def maybe_update(db_field: str, guild_value: t.Union[str, int]) -> None: # Equalize DB user and guild user attributes. - if db_user[db_field] != guild_value: - updated_fields[db_field] = guild_value + if db_user[db_field] != guild_value: # noqa: B023 + updated_fields[db_field] = guild_value # noqa: B023 guild_user = guild.get_member(db_user["id"]) if not guild_user and db_user["in_guild"]: diff --git a/bot/exts/filters/antispam.py b/bot/exts/filters/antispam.py index 3b925bacd..842aab384 100644 --- a/bot/exts/filters/antispam.py +++ b/bot/exts/filters/antispam.py @@ -185,7 +185,7 @@ class AntiSpam(Cog): # Create a list of messages that were sent in the interval that the rule cares about. latest_interesting_stamp = arrow.utcnow() - timedelta(seconds=rule_config['interval']) messages_for_rule = list( - takewhile(lambda msg: msg.created_at > latest_interesting_stamp, relevant_messages) + takewhile(lambda msg: msg.created_at > latest_interesting_stamp, relevant_messages) # noqa: B023 ) result = await rule_function(message, messages_for_rule, rule_config) @@ -4,7 +4,7 @@ docstring-convention=all import-order-style=pycharm application_import_names=bot,tests exclude=.cache,.venv,.git,constants.py -ignore= +extend-ignore= B311,W503,E226,S311,T000,E731 # Missing Docstrings D100,D104,D105,D107, |