|
|
@ -38,14 +38,10 @@ if TYPE_CHECKING: |
|
|
|
from ..interactions import Interaction |
|
|
|
from ..components import Component |
|
|
|
from ..enums import ComponentType |
|
|
|
from .view import BaseView |
|
|
|
from .view import View, LayoutView |
|
|
|
|
|
|
|
V = TypeVar('V', bound='BaseView', covariant=True, default=BaseView) |
|
|
|
else: |
|
|
|
V = TypeVar('V', bound='BaseView', covariant=True) |
|
|
|
|
|
|
|
|
|
|
|
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 |
|
|
|
that ``custom_id``. |
|
|
|
|
|
|
|