From d5946d1cbc78bd90b3c1ca5cc84e8f638f3f75dc Mon Sep 17 00:00:00 2001 From: Rapptz Date: Mon, 25 Aug 2025 11:29:03 -0400 Subject: [PATCH] Fix bounds for TextInput and Label generic Fix #10280 --- discord/ui/label.py | 4 ++-- discord/ui/text_input.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/discord/ui/label.py b/discord/ui/label.py index 9357de425..7a2d496a6 100644 --- a/discord/ui/label.py +++ b/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]): diff --git a/discord/ui/text_input.py b/discord/ui/text_input.py index 288e5efdc..de0c8e079 100644 --- a/discord/ui/text_input.py +++ b/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]):