Skip to content

Commit f0c8e53

Browse files
refactor: ♻️ remove _typed_dict in favor of typing_extensions (#2621)
♻️ Use `typing_extensions` instead of `_typed_dict` Co-authored-by: Dorukyum <[email protected]>
1 parent 51b8dae commit f0c8e53

26 files changed

+44
-63
lines changed

discord/_typed_dict.py

Lines changed: 0 additions & 38 deletions
This file was deleted.

discord/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
import warnings
3131
from importlib.metadata import PackageNotFoundError, version
3232

33-
from ._typed_dict import TypedDict
33+
from typing_extensions import TypedDict
3434

3535
__all__ = ("__version__", "VersionInfo", "version_info")
3636

discord/types/activity.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@
2727

2828
from typing import Literal
2929

30-
from .._typed_dict import NotRequired, TypedDict
30+
from typing_extensions import NotRequired, TypedDict
31+
3132
from .snowflake import Snowflake
3233
from .user import PartialUser
3334

discord/types/appinfo.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@
2525

2626
from __future__ import annotations
2727

28-
from .._typed_dict import NotRequired, TypedDict
28+
from typing_extensions import NotRequired, TypedDict
29+
2930
from .snowflake import Snowflake
3031
from .team import Team
3132
from .user import User

discord/types/application_role_connection.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626

2727
from typing import Literal
2828

29-
from .._typed_dict import NotRequired, TypedDict
29+
from typing_extensions import NotRequired, TypedDict
3030

3131
ApplicationRoleConnectionMetadataType = Literal[1, 2, 3, 4, 5, 6, 7, 8]
3232

discord/types/audit_log.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@
2727

2828
from typing import Literal, Union
2929

30-
from .._typed_dict import NotRequired, TypedDict
30+
from typing_extensions import NotRequired, TypedDict
31+
3132
from .automod import AutoModRule
3233
from .channel import ChannelType, PermissionOverwrite, VideoQualityMode
3334
from .guild import (

discord/types/automod.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@
2424

2525
from typing import Literal
2626

27-
from .._typed_dict import NotRequired, TypedDict
27+
from typing_extensions import NotRequired, TypedDict
28+
2829
from .snowflake import Snowflake
2930

3031
AutoModTriggerType = Literal[1, 2, 3, 4, 5]

discord/types/channel.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@
2727

2828
from typing import Literal, Union
2929

30-
from .._typed_dict import NotRequired, TypedDict
30+
from typing_extensions import NotRequired, TypedDict
31+
3132
from ..enums import SortOrder
3233
from ..flags import ChannelFlags
3334
from .snowflake import Snowflake

discord/types/components.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@
2727

2828
from typing import Literal, Union
2929

30-
from .._typed_dict import NotRequired, TypedDict
30+
from typing_extensions import NotRequired, TypedDict
31+
3132
from .channel import ChannelType
3233
from .emoji import PartialEmoji
3334
from .snowflake import Snowflake

discord/types/embed.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727

2828
from typing import Literal
2929

30-
from .._typed_dict import NotRequired, TypedDict
30+
from typing_extensions import NotRequired, TypedDict
3131

3232

3333
class EmbedFooter(TypedDict):

0 commit comments

Comments
 (0)