Browse Source

Run "black discord"

pull/10189/head
Soheab_ 2 weeks ago
parent
commit
edb32b6337
  1. 1
      discord/client.py
  2. 3
      discord/ext/commands/cog.py
  3. 4
      discord/ext/commands/core.py

1
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',

3
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',

4
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)

Loading…
Cancel
Save