Remove redundant imports and variables

This commit is contained in:
Kellen 2022-03-29 00:50:34 -06:00 committed by GitHub
parent f5acd9e8b6
commit 4fd2d5fdfd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 4 additions and 14 deletions

View File

@ -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

View File

@ -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,

View File

@ -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

View File

@ -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

View File

@ -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

View File

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

View File

@ -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