diff options
Diffstat (limited to '')
| -rw-r--r-- | bot/constants.py | 4 | ||||
| -rw-r--r-- | bot/exts/info/doc/_redis_cache.py | 1 | ||||
| -rw-r--r-- | bot/rules/discord_emojis.py | 1 | ||||
| -rw-r--r-- | bot/rules/links.py | 1 | ||||
| -rw-r--r-- | tests/bot/exts/backend/sync/test_base.py | 1 | 
5 files changed, 2 insertions, 6 deletions
| diff --git a/bot/constants.py b/bot/constants.py index 140dd12f9..f704c9e6a 100644 --- a/bot/constants.py +++ b/bot/constants.py @@ -119,13 +119,12 @@ def check_required_keys(keys):                  if lookup is None:                      raise KeyError(key)          except KeyError: -            raise ( +            raise KeyError(                  f"A configuration for `{key_path}` is required, but was not found. "                  "Please set it in `config.yml` or setup an environment variable and try again."              ) -  try:      required_keys = _CONFIG_YAML['config']['required_keys']  except KeyError: @@ -182,7 +181,6 @@ class YAMLGetter(type):                  (cls.section, cls.subsection, name)                  if cls.subsection is not None else (cls.section, name)              ) -            # Only an print since this can be caught through `hasattr` or `getattr`.              print(f"Tried accessing configuration variable at `{dotted_path}`, but it could not be found.")              raise AttributeError(repr(name)) from e diff --git a/bot/exts/info/doc/_redis_cache.py b/bot/exts/info/doc/_redis_cache.py index ad764816f..79648893a 100644 --- a/bot/exts/info/doc/_redis_cache.py +++ b/bot/exts/info/doc/_redis_cache.py @@ -4,6 +4,7 @@ import datetime  from typing import Optional, TYPE_CHECKING  from async_rediscache.types.base import RedisObject, namespace_lock +  if TYPE_CHECKING:      from ._cog import DocItem diff --git a/bot/rules/discord_emojis.py b/bot/rules/discord_emojis.py index 41faf7ee8..d979ac5e7 100644 --- a/bot/rules/discord_emojis.py +++ b/bot/rules/discord_emojis.py @@ -4,7 +4,6 @@ from typing import Dict, Iterable, List, Optional, Tuple  from discord import Member, Message  from emoji import demojize -  DISCORD_EMOJI_RE = re.compile(r"<:\w+:\d+>|:\w+:")  CODE_BLOCK_RE = re.compile(r"```.*?```", flags=re.DOTALL) diff --git a/bot/rules/links.py b/bot/rules/links.py index ec75a19c5..c46b783c5 100644 --- a/bot/rules/links.py +++ b/bot/rules/links.py @@ -3,7 +3,6 @@ from typing import Dict, Iterable, List, Optional, Tuple  from discord import Member, Message -  LINK_RE = re.compile(r"(https?://[^\s]+)") diff --git a/tests/bot/exts/backend/sync/test_base.py b/tests/bot/exts/backend/sync/test_base.py index 3ad9db9c3..9dc46005b 100644 --- a/tests/bot/exts/backend/sync/test_base.py +++ b/tests/bot/exts/backend/sync/test_base.py @@ -1,7 +1,6 @@  import unittest  from unittest import mock -  from bot.api import ResponseCodeError  from bot.exts.backend.sync._syncers import Syncer  from tests import helpers | 
