Skip to content

Commit 090af2e

Browse files
authored
typecheck again
1 parent bd60e9b commit 090af2e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

discord/ui/label.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ def set_item(self, item: Item) -> Self:
8888
8989
Parameters
9090
----------
91-
item: :class:`Item`
91+
item: Union[:class:`Item`, :class:`InputText`]
9292
The item to set.
9393
Currently only supports :class:`~discord.ui.Select` and :class:`~discord.ui.InputText`.
9494
@@ -98,7 +98,7 @@ def set_item(self, item: Item) -> Self:
9898
An :class:`Item` was not passed.
9999
"""
100100

101-
if not isinstance(item, Item):
101+
if not isinstance(item, (Item, InputText)):
102102
raise TypeError(f"expected Item not {item.__class__!r}")
103103
if isinstance(item, InputText) and item.label:
104104
raise ValueError(f"InputText.label cannot be set inside Label")

0 commit comments

Comments
 (0)