Skip to content

Commit 29f6358

Browse files
style(pre-commit): auto fixes from pre-commit.com hooks
1 parent 9ca683b commit 29f6358

32 files changed

+27
-68
lines changed

discord/_version.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
import re
3030
import warnings
3131
from importlib.metadata import PackageNotFoundError, version
32-
3332
from typing import TypedDict
3433

3534
__all__ = ("__version__", "VersionInfo", "version_info")
@@ -155,4 +154,3 @@ def date(self) -> datetime.date | None:
155154
commit=raw_info["commit"],
156155
date=date_info,
157156
)
158-

discord/commands/context.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -437,4 +437,3 @@ def command(self) -> ApplicationCommand | None:
437437
@command.setter
438438
def command(self, value: ApplicationCommand | None) -> None:
439439
self.interaction.command = value
440-

discord/commands/core.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,19 +30,22 @@
3030
import functools
3131
import inspect
3232
import re
33-
import sys
3433
import types
3534
from collections import OrderedDict
3635
from enum import Enum
3736
from typing import (
3837
TYPE_CHECKING,
38+
Annotated,
3939
Any,
4040
Callable,
4141
Coroutine,
4242
Generator,
4343
Generic,
44+
Literal,
4445
TypeVar,
4546
Union,
47+
get_args,
48+
get_origin,
4649
)
4750

4851
from ..channel import PartialMessageable, _threaded_guild_channel_factory
@@ -72,8 +75,6 @@
7275
from .context import ApplicationContext, AutocompleteContext
7376
from .options import Option, OptionChoice
7477

75-
from typing import Annotated, Literal, get_args, get_origin
76-
7778
__all__ = (
7879
"_BaseCommand",
7980
"ApplicationCommand",
@@ -2156,4 +2157,3 @@ def validate_chat_input_description(description: Any, locale: str | None = None)
21562157
if locale:
21572158
error.args = (f"{error.args[0]} in locale {locale}",)
21582159
raise error
2159-

discord/commands/options.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -554,4 +554,3 @@ def decorator(func):
554554
return func
555555

556556
return decorator
557-

discord/ext/commands/context.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -409,4 +409,3 @@ async def forward_to(
409409
self, channel: discord.abc.Messageable, **kwargs: Any
410410
) -> Message:
411411
return await self.message.forward_to(channel, **kwargs)
412-

discord/ext/commands/core.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2501,4 +2501,3 @@ def decorator(func: Command | CoroFunc) -> Command | CoroFunc:
25012501
return func
25022502

25032503
return decorator # type: ignore
2504-

discord/types/activity.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,8 @@
2525

2626
from __future__ import annotations
2727

28-
from typing import Literal
28+
from typing import Literal, TypedDict
2929

30-
from typing import TypedDict
3130
from typing_extensions import NotRequired
3231

3332
from .snowflake import Snowflake
@@ -110,4 +109,3 @@ class Activity(_BaseActivity, total=False):
110109
session_id: str | None
111110
instance: bool
112111
buttons: list[str]
113-

discord/types/appinfo.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
from __future__ import annotations
2727

2828
from typing import TypedDict
29+
2930
from typing_extensions import NotRequired
3031

3132
from .snowflake import Snowflake
@@ -66,4 +67,3 @@ class PartialAppInfo(BaseAppInfo):
6667
class AppInstallParams(TypedDict):
6768
scopes: list[str]
6869
permissions: str
69-

discord/types/application_role_connection.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,8 @@
2424

2525
from __future__ import annotations
2626

27-
from typing import Literal
27+
from typing import Literal, TypedDict
2828

29-
from typing import TypedDict
3029
from typing_extensions import NotRequired
3130

3231
ApplicationRoleConnectionMetadataType = Literal[1, 2, 3, 4, 5, 6, 7, 8]
@@ -39,4 +38,3 @@ class ApplicationRoleConnectionMetadata(TypedDict):
3938
name_localizations: NotRequired[dict[str, str]]
4039
description: str
4140
description_localizations: NotRequired[dict[str, str]]
42-

discord/types/audit_log.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,8 @@
2525

2626
from __future__ import annotations
2727

28-
from typing import Literal, Union
28+
from typing import Literal, TypedDict, Union
2929

30-
from typing import TypedDict
3130
from typing_extensions import NotRequired
3231

3332
from .automod import AutoModRule
@@ -295,4 +294,3 @@ class AuditLog(TypedDict):
295294
threads: list[Thread]
296295
scheduled_events: list[ScheduledEvent]
297296
auto_moderation_rules: list[AutoModRule]
298-

0 commit comments

Comments
 (0)