mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-08-28 14:05:05 +00:00
Revert "Add second generic parameter for view for DynamicItem"
This reverts commit fe7ce982f332d421e12ddd0e1d4babb17c35c1d6.
This commit is contained in:
parent
9677dada1f
commit
63357e0113
@ -39,14 +39,11 @@ if TYPE_CHECKING:
|
|||||||
from ..components import Component
|
from ..components import Component
|
||||||
from ..enums import ComponentType
|
from ..enums import ComponentType
|
||||||
from .view import View, LayoutView
|
from .view import View, LayoutView
|
||||||
|
|
||||||
V = TypeVar('V', bound=Union[View, LayoutView], covariant=True, default=Union[View, LayoutView])
|
|
||||||
else:
|
else:
|
||||||
View = LayoutView = Any
|
View = LayoutView = Any
|
||||||
from .item import V
|
|
||||||
|
|
||||||
|
|
||||||
class DynamicItem(Generic[BaseT, V], Item[V]):
|
class DynamicItem(Generic[BaseT], Item[Union[View, LayoutView]]):
|
||||||
"""Represents an item with a dynamic ``custom_id`` that can be used to store state within
|
"""Represents an item with a dynamic ``custom_id`` that can be used to store state within
|
||||||
that ``custom_id``.
|
that ``custom_id``.
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user