Fix typing issues and improve typing completeness across the library

Co-authored-by: Danny <Rapptz@users.noreply.github.com>
Co-authored-by: Josh <josh.ja.butt@gmail.com>
This commit is contained in:
Stocker
2022-03-13 23:52:10 -04:00
committed by GitHub
parent 603681940f
commit 5aa696ccfa
66 changed files with 1071 additions and 802 deletions

View File

@ -101,7 +101,7 @@ class Item(Generic[V]):
return self._row
@row.setter
def row(self, value: Optional[int]):
def row(self, value: Optional[int]) -> None:
if value is None:
self._row = None
elif 5 > value >= 0:
@ -118,7 +118,7 @@ class Item(Generic[V]):
"""Optional[:class:`View`]: The underlying view for this item."""
return self._view
async def callback(self, interaction: Interaction):
async def callback(self, interaction: Interaction) -> Any:
"""|coro|
The callback associated with this UI item.