From 860d0b1555f4d98baed8c492981b0bd3cdd3bb8e Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Sat, 26 Nov 2022 19:03:31 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- discord/cog.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/discord/cog.py b/discord/cog.py index 95035a7d6c..ae4bd5b24f 100644 --- a/discord/cog.py +++ b/discord/cog.py @@ -232,7 +232,11 @@ def __new__(cls: type[CogMeta], *args: Any, **kwargs: Any) -> CogMeta: # r.e type ignore, type-checker complains about overriding a ClassVar new_cls.__cog_commands__ = tuple(c._update_copy(cmd_attrs) if not hasattr(c, "add_to") else c for c in new_cls.__cog_commands__) # type: ignore - name_filter = lambda c: "app" if isinstance(c, ApplicationCommand) else ("bridge" if not hasattr(c, "add_to") else "ext") + name_filter = ( + lambda c: "app" + if isinstance(c, ApplicationCommand) + else ("bridge" if not hasattr(c, "add_to") else "ext") + ) lookup = { f"{name_filter(cmd)}_{cmd.qualified_name}": cmd @@ -248,7 +252,9 @@ def __new__(cls: type[CogMeta], *args: Any, **kwargs: Any) -> CogMeta: ): command.guild_ids = new_cls.__cog_guild_ids__ - if not isinstance(command, SlashCommandGroup) and not hasattr(command, "add_to"): + if not isinstance(command, SlashCommandGroup) and not hasattr( + command, "add_to" + ): # ignore bridge commands cmd = getattr(new_cls, command.callback.__name__, None) if hasattr(cmd, "add_to"):