From edb32b6337a424a7cfea97ae6692ec2d4070fa7c Mon Sep 17 00:00:00 2001 From: Soheab_ <33902984+Soheab@users.noreply.github.com> Date: Sat, 17 May 2025 16:25:42 +0200 Subject: [PATCH] Run "black discord" --- discord/client.py | 1 + discord/ext/commands/cog.py | 3 ++- discord/ext/commands/core.py | 4 ++-- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/discord/client.py b/discord/client.py index d7f67580f..adbfb2583 100644 --- a/discord/client.py +++ b/discord/client.py @@ -144,6 +144,7 @@ if TYPE_CHECKING: max_ratelimit_timeout: NotRequired[Optional[float]] connector: NotRequired[Optional[aiohttp.BaseConnector]] + # fmt: off __all__ = ( 'Client', diff --git a/discord/ext/commands/cog.py b/discord/ext/commands/cog.py index f80cf0336..48069dd85 100644 --- a/discord/ext/commands/cog.py +++ b/discord/ext/commands/cog.py @@ -44,7 +44,7 @@ from typing import ( Tuple, TypeVar, Union, - TypedDict + TypedDict, ) from ._types import _BaseCommand, BotT @@ -68,6 +68,7 @@ if TYPE_CHECKING: group_extras: NotRequired[Dict[Any, Any]] command_attrs: NotRequired[_CommandDecoratorKwargs] + __all__ = ( 'CogMeta', 'Cog', diff --git a/discord/ext/commands/core.py b/discord/ext/commands/core.py index ccd85a5ae..d9598786c 100644 --- a/discord/ext/commands/core.py +++ b/discord/ext/commands/core.py @@ -425,7 +425,7 @@ class Command(_BaseCommand, Generic[CogT, P, T]): ) -> None: if not asyncio.iscoroutinefunction(func): raise TypeError('Callback must be a coroutine.') - + name = kwargs.get('name') or func.__name__ if not isinstance(name, str): raise TypeError('Name of a command must be a string.') @@ -481,7 +481,7 @@ class Command(_BaseCommand, Generic[CogT, P, T]): max_concurrency = kwargs.get('max_concurrency') self._max_concurrency: Optional[MaxConcurrency] = max_concurrency - + self.require_var_positional: bool = kwargs.get('require_var_positional', False) self.ignore_extra: bool = kwargs.get('ignore_extra', True) self.cooldown_after_parsing: bool = kwargs.get('cooldown_after_parsing', False)