|
30 | 30 | import sys
|
31 | 31 | from collections.abc import Sequence
|
32 | 32 | from functools import partial
|
33 |
| -from typing import TYPE_CHECKING, Any, Callable, Generic, Literal, TypeVar, overload |
| 33 | +from typing import TYPE_CHECKING, Any, Callable, Generic, Literal, overload |
| 34 | + |
| 35 | +from typing_extensions import TypeVar |
34 | 36 |
|
35 | 37 | from ..channel import _threaded_guild_channel_factory
|
36 | 38 | from ..components import SelectDefaultValue, SelectMenu, SelectOption
|
|
62 | 64 | )
|
63 | 65 |
|
64 | 66 | if TYPE_CHECKING:
|
65 |
| - from typing_extensions import Self |
66 |
| - |
67 | 67 | from ..abc import GuildChannel, Snowflake
|
68 | 68 | from ..types.components import SelectMenu as SelectMenuPayload
|
69 | 69 | from ..types.interactions import ComponentInteractionData
|
70 | 70 | from .view import View
|
71 | 71 |
|
72 |
| - ST = TypeVar("ST", bound=Snowflake | str, covariant=True, default=Any) |
73 |
| -else: |
74 |
| - if sys.version_info >= (3, 13): |
75 |
| - ST = TypeVar("ST", bound="Snowflake | str", covariant=True, default=Any) |
76 |
| - else: |
77 |
| - ST = TypeVar("ST", bound="Snowflake | str", covariant=True) |
| 72 | +ST = TypeVar("ST", bound=Snowflake | str, covariant=True, default=Any) |
78 | 73 |
|
79 | 74 | S = TypeVar("S", bound="Select")
|
80 | 75 | V = TypeVar("V", bound="View", covariant=True)
|
81 | 76 |
|
82 | 77 |
|
83 |
| -class Select(Generic[V, ST], Item[V]): |
| 78 | +class Select(Item[V], Generic[V, ST]): |
84 | 79 | """Represents a UI select menu.
|
85 | 80 |
|
86 | 81 | This is usually represented as a drop down menu.
|
|
0 commit comments