Fix bounds for TextInput and Label generic

Fix #10280
This commit is contained in:
Rapptz 2025-08-25 11:29:03 -04:00
parent 91281f23a0
commit d5946d1cbc
2 changed files with 4 additions and 4 deletions

View File

@ -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]):

View File

@ -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]):