mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-04-18 23:15:48 +00:00
Remove redundant imports and variables
This commit is contained in:
parent
f5acd9e8b6
commit
4fd2d5fdfd
@ -461,8 +461,6 @@ class GuildChannelConverter(IDConverter[discord.abc.GuildChannel]):
|
||||
|
||||
@staticmethod
|
||||
def _resolve_thread(ctx: Context[BotT], argument: str, attribute: str, type: Type[TT]) -> TT:
|
||||
bot = ctx.bot
|
||||
|
||||
match = IDConverter._get_id_match(argument) or re.match(r'<#([0-9]{15,20})>$', argument)
|
||||
result = None
|
||||
guild = ctx.guild
|
||||
|
@ -66,10 +66,7 @@ if TYPE_CHECKING:
|
||||
from .embeds import Embed
|
||||
from .message import Attachment
|
||||
from .flags import MessageFlags
|
||||
from .enums import (
|
||||
AuditLogAction,
|
||||
InteractionResponseType,
|
||||
)
|
||||
from .enums import AuditLogAction
|
||||
|
||||
from .types import (
|
||||
appinfo,
|
||||
@ -86,7 +83,6 @@ if TYPE_CHECKING:
|
||||
role,
|
||||
user,
|
||||
webhook,
|
||||
channel,
|
||||
widget,
|
||||
threads,
|
||||
scheduled_event,
|
||||
|
@ -69,7 +69,7 @@ if TYPE_CHECKING:
|
||||
from .ui.view import View
|
||||
from .app_commands.models import Choice, ChoiceT
|
||||
from .ui.modal import Modal
|
||||
from .channel import VoiceChannel, StageChannel, TextChannel, CategoryChannel, PartialMessageable
|
||||
from .channel import VoiceChannel, StageChannel, TextChannel, CategoryChannel
|
||||
from .threads import Thread
|
||||
from .app_commands.commands import Command, ContextMenu
|
||||
|
||||
|
@ -28,7 +28,7 @@ import datetime
|
||||
import inspect
|
||||
import itertools
|
||||
from operator import attrgetter
|
||||
from typing import Any, Callable, Collection, Coroutine, Dict, List, Literal, Optional, TYPE_CHECKING, Tuple, Union, Type
|
||||
from typing import Any, Callable, Collection, Coroutine, Dict, List, Optional, TYPE_CHECKING, Tuple, Union, Type
|
||||
|
||||
import discord.abc
|
||||
|
||||
@ -51,7 +51,6 @@ __all__ = (
|
||||
if TYPE_CHECKING:
|
||||
from typing_extensions import Self
|
||||
|
||||
from .asset import Asset
|
||||
from .channel import DMChannel, VoiceChannel, StageChannel
|
||||
from .flags import PublicUserFlags
|
||||
from .guild import Guild
|
||||
|
@ -40,7 +40,6 @@ from typing import (
|
||||
Callable,
|
||||
Tuple,
|
||||
ClassVar,
|
||||
Optional,
|
||||
Type,
|
||||
overload,
|
||||
)
|
||||
@ -85,7 +84,7 @@ if TYPE_CHECKING:
|
||||
from .types.embed import Embed as EmbedPayload
|
||||
from .types.gateway import MessageReactionRemoveEvent, MessageUpdateEvent
|
||||
from .abc import Snowflake
|
||||
from .abc import GuildChannel, PartialMessageableChannel, MessageableChannel
|
||||
from .abc import GuildChannel, MessageableChannel
|
||||
from .components import Component
|
||||
from .state import ConnectionState
|
||||
from .channel import TextChannel
|
||||
|
@ -48,7 +48,6 @@ from typing import TYPE_CHECKING, Any, Callable, Tuple, Type, Optional, List, Di
|
||||
if TYPE_CHECKING:
|
||||
from .gateway import DiscordWebSocket
|
||||
from .activity import BaseActivity
|
||||
from .enums import Status
|
||||
|
||||
__all__ = (
|
||||
'AutoShardedClient',
|
||||
|
@ -35,7 +35,6 @@ from .role import Role
|
||||
from .member import Member
|
||||
from .emoji import Emoji
|
||||
from .user import User
|
||||
from .sticker import GuildSticker
|
||||
from .threads import Thread
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user