mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-08-23 11:46:18 +00:00
Fix type error with ItemCallbackType
This commit is contained in:
parent
0c98251087
commit
6f6d990195
@ -65,10 +65,11 @@ if TYPE_CHECKING:
|
|||||||
from ..emoji import Emoji
|
from ..emoji import Emoji
|
||||||
from ..components import SelectOption
|
from ..components import SelectOption
|
||||||
from ..interactions import Interaction
|
from ..interactions import Interaction
|
||||||
|
from .container import Container
|
||||||
|
|
||||||
SelectCallbackDecorator = Callable[[ItemCallbackType['S', BaseSelectT]], BaseSelectT]
|
SelectCallbackDecorator = Callable[[ItemCallbackType['S', BaseSelectT]], BaseSelectT]
|
||||||
|
|
||||||
S = TypeVar('S', bound=Union['ActionRow', 'LayoutView'], covariant=True)
|
S = TypeVar('S', bound=Union['ActionRow', 'Container', 'LayoutView'], covariant=True)
|
||||||
V = TypeVar('V', bound='LayoutView', covariant=True)
|
V = TypeVar('V', bound='LayoutView', covariant=True)
|
||||||
|
|
||||||
__all__ = ('ActionRow',)
|
__all__ = ('ActionRow',)
|
||||||
|
@ -45,10 +45,11 @@ if TYPE_CHECKING:
|
|||||||
|
|
||||||
from .view import BaseView
|
from .view import BaseView
|
||||||
from .action_row import ActionRow
|
from .action_row import ActionRow
|
||||||
|
from .container import Container
|
||||||
from ..emoji import Emoji
|
from ..emoji import Emoji
|
||||||
from ..types.components import ButtonComponent as ButtonComponentPayload
|
from ..types.components import ButtonComponent as ButtonComponentPayload
|
||||||
|
|
||||||
S = TypeVar('S', bound='Union[BaseView, ActionRow]', covariant=True)
|
S = TypeVar('S', bound='Union[BaseView, Container, ActionRow]', covariant=True)
|
||||||
V = TypeVar('V', bound='BaseView', covariant=True)
|
V = TypeVar('V', bound='BaseView', covariant=True)
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user