Improve component typing

This commit is contained in:
Lilly Rose Berner authored and GitHub committed 2022-05-16 15:30:03 -04:00
1 parent b7e25645dc
commit 7267d18d9e
10 files changed
+131 -69

No files matched your search

+1 -2
View File
@@ -114,7 +114,6 @@ class TextInput(Item[V]):
raise TypeError(f'expected custom_id to be str not {custom_id.__class__!r}')
self._underlying = TextInputComponent._raw_construct(
type=ComponentType.text_input,
label=label,
style=style,
custom_id=custom_id,
@@ -238,7 +237,7 @@ class TextInput(Item[V]):
@property
def type(self) -> Literal[ComponentType.text_input]:
return ComponentType.text_input
return self._underlying.type
def is_dispatchable(self) -> bool:
return False