Skip to content

Commit 0f1121e

Browse files
Lock file maintenance pep621 (#442)
* Lock file maintenance pep621 * Fix misuse of logging * Ignore command check invalid types Related to #349 * Reorganise suspension of fixing custom exception messages --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Matt Norton <matt@carrotmanmatt.com>
1 parent 05888b0 commit 0f1121e

4 files changed

Lines changed: 57 additions & 56 deletions

File tree

cogs/command_error.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,14 @@ async def on_application_command_error(
5252
error_code = error.original.ERROR_CODE
5353

5454
elif isinstance(error, CheckAnyFailure):
55-
if CommandChecks.is_interaction_user_in_main_guild_failure(error.checks[0]):
55+
# TODO: Remove type ignore comments once #349 is resolved # noqa: FIX002
56+
if CommandChecks.is_interaction_user_in_main_guild_failure(error.checks[0]): # type: ignore[arg-type]
5657
message = (
5758
f"You must be a member of the {self.bot.group_short_name} Discord server "
5859
"to use this command."
5960
)
6061

61-
elif CommandChecks.is_interaction_user_has_committee_role_failure(error.checks[0]):
62+
elif CommandChecks.is_interaction_user_has_committee_role_failure(error.checks[0]): # type: ignore[arg-type]
6263
# noinspection PyUnusedLocal
6364
committee_role_mention: str = "@Committee"
6465
with contextlib.suppress(CommitteeRoleDoesNotExistError):

config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -687,7 +687,7 @@ def _setup_env_variables(cls) -> None:
687687
are only stored after the input values have been validated.
688688
"""
689689
if cls._is_env_variables_setup:
690-
logging.warning("Environment variables have already been set up.")
690+
logger.warning("Environment variables have already been set up.")
691691
return
692692

693693
dotenv.load_dotenv()

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ main = [
1414
"matplotlib>=3.10",
1515
"mplcyberpunk>=0.7",
1616
"parsedatetime>=2.6",
17-
"py-cord>=2.6,<2.6.1", # TODO: Remove version limit once #349 is resolved
17+
"py-cord>=2.6",
1818
"python-dotenv>=1.0",
1919
"python-logging-discord-handler>=0.1",
2020
"typed_classproperties>=1.1.3",

0 commit comments

Comments
 (0)