Skip to content

Commit 1ab8021

Browse files
MiddledotBobDotCom
authored andcommitted
Remove unused imports and variables (#1608)
1 parent 97f9de7 commit 1ab8021

File tree

7 files changed

+3
-12
lines changed

7 files changed

+3
-12
lines changed

discord/bot.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -534,7 +534,7 @@ def register(method: Literal["bulk", "upsert", "delete", "edit"], *args, **kwarg
534534
registered = prefetched_commands
535535
else:
536536
_log.debug(
537-
f"Bulk updating commands %s for guild %s",
537+
"Bulk updating commands %s for guild %s",
538538
{c["command"].name: c["action"] for c in pending_actions},
539539
guild_id,
540540
)

discord/commands/context.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,13 @@
3939
from ..voice_client import VoiceProtocol
4040

4141
from .core import ApplicationCommand, Option
42-
from ..interactions import Interaction, InteractionResponse, InteractionChannel
42+
from ..interactions import InteractionChannel
4343
from ..guild import Guild
4444
from ..member import Member
4545
from ..message import Message
4646
from ..user import User
4747
from ..permissions import Permissions
4848
from ..client import ClientUser
49-
from discord.webhook.async_ import Webhook
5049

5150
from ..cog import Cog
5251
from ..webhook import WebhookMessage

discord/ext/commands/bot.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,9 @@
4040
from .view import StringView
4141

4242
if TYPE_CHECKING:
43-
import importlib.machinery
44-
4543
from discord.message import Message
4644

47-
from ._types import Check, CoroFunc
45+
from ._types import CoroFunc
4846

4947
__all__ = (
5048
"when_mentioned",

discord/ext/commands/context.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@
4545
from .bot import AutoShardedBot, Bot
4646
from .cog import Cog
4747
from .core import Command
48-
from .help import HelpCommand
4948
from .view import StringView
5049

5150
__all__ = ("Context",)

discord/ext/commands/converter.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -464,8 +464,6 @@ def check(c):
464464

465465
@staticmethod
466466
def _resolve_thread(ctx: Context, argument: str, attribute: str, type: Type[TT]) -> TT:
467-
bot = ctx.bot
468-
469467
match = IDConverter._get_id_match(argument) or re.match(r"<#([0-9]{15,20})>$", argument)
470468
result = None
471469
guild = ctx.guild

discord/iterators.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@
5555

5656
if TYPE_CHECKING:
5757
from .abc import Snowflake
58-
from .audit_logs import AuditLogEntry
5958
from .guild import BanEntry, Guild
6059
from .member import Member
6160
from .message import Message

discord/webhook/sync.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,6 @@
4545
Literal,
4646
Optional,
4747
Tuple,
48-
Type,
49-
TypeVar,
5048
Union,
5149
overload,
5250
)

0 commit comments

Comments
 (0)