Browse Source

Fix bounds for TextInput and Label generic

Fix #10280
auto/crowdin
Rapptz 2 days ago
parent
commit
d5946d1cbc
  1. 4
      discord/ui/label.py
  2. 4
      discord/ui/text_input.py

4
discord/ui/label.py

@ -35,7 +35,7 @@ if TYPE_CHECKING:
from typing_extensions import Self
from ..types.components import LabelComponent as LabelComponentPayload
from .view import View
from .view import BaseView
# fmt: off
@ -44,7 +44,7 @@ __all__ = (
)
# fmt: on
V = TypeVar('V', bound='View', covariant=True)
V = TypeVar('V', bound='BaseView', covariant=True)
class Label(Item[V]):

4
discord/ui/text_input.py

@ -37,7 +37,7 @@ if TYPE_CHECKING:
from ..types.components import TextInput as TextInputPayload
from ..types.interactions import ModalSubmitTextInputInteractionData as ModalSubmitTextInputInteractionDataPayload
from .view import View
from .view import BaseView
from ..interactions import Interaction
@ -47,7 +47,7 @@ __all__ = (
)
# fmt: on
V = TypeVar('V', bound='View', covariant=True)
V = TypeVar('V', bound='BaseView', covariant=True)
class TextInput(Item[V]):

Loading…
Cancel
Save