From aa697011619bcc78b60c49b02f235d8f9b8d0ccd Mon Sep 17 00:00:00 2001 From: TripleM <46387250+ManuelMaM@users.noreply.github.com> Date: Fri, 20 May 2022 22:35:56 -0300 Subject: [PATCH] Remove direct discord.utils.MISSING references (#290) Co-authored-by: dolfies --- discord/ext/commands/cog.py | 5 +---- discord/ext/commands/context.py | 3 +-- discord/ext/commands/help.py | 3 +-- 3 files changed, 3 insertions(+), 8 deletions(-) diff --git a/discord/ext/commands/cog.py b/discord/ext/commands/cog.py index b69a47d25..498d344ca 100644 --- a/discord/ext/commands/cog.py +++ b/discord/ext/commands/cog.py @@ -24,8 +24,7 @@ DEALINGS IN THE SOFTWARE. from __future__ import annotations import inspect -import discord -from discord.utils import maybe_coroutine +from discord.utils import maybe_coroutine, MISSING from typing import Any, Callable, Dict, Generator, List, Optional, TYPE_CHECKING, Tuple, TypeVar @@ -45,8 +44,6 @@ __all__ = ( FuncT = TypeVar('FuncT', bound=Callable[..., Any]) -MISSING: Any = discord.utils.MISSING - class CogMeta(type): """A metaclass for defining a cog. diff --git a/discord/ext/commands/context.py b/discord/ext/commands/context.py index c520dcc1e..52191c64c 100644 --- a/discord/ext/commands/context.py +++ b/discord/ext/commands/context.py @@ -28,6 +28,7 @@ from typing import TYPE_CHECKING, Any, AsyncIterator, Dict, Generic, List, Optio import discord.abc import discord.utils +from discord.utils import MISSING from discord.message import Message from ._types import BotT @@ -54,8 +55,6 @@ __all__ = ( ) # fmt: on -MISSING: Any = discord.utils.MISSING - T = TypeVar('T') CogT = TypeVar('CogT', bound="Cog") diff --git a/discord/ext/commands/help.py b/discord/ext/commands/help.py index ca2dab52e..5f1e9bcfa 100644 --- a/discord/ext/commands/help.py +++ b/discord/ext/commands/help.py @@ -45,6 +45,7 @@ from typing import ( ) import discord.utils +from discord.utils import MISSING from .core import Group, Command, get_signature_parameters from .errors import CommandError @@ -75,8 +76,6 @@ __all__ = ( FuncT = TypeVar('FuncT', bound=Callable[..., Any]) -MISSING: Any = discord.utils.MISSING - # help -> shows info of bot on top/bottom and lists subcommands # help command -> shows detailed info of command # help command -> same as above