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)