mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-09-06 09:56:09 +00:00
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:
@ -310,9 +310,9 @@ class SelectOption:
|
||||
emoji: Optional[Union[str, Emoji, PartialEmoji]] = None,
|
||||
default: bool = False,
|
||||
) -> None:
|
||||
self.label = label
|
||||
self.value = label if value is MISSING else value
|
||||
self.description = description
|
||||
self.label: str = label
|
||||
self.value: str = label if value is MISSING else value
|
||||
self.description: Optional[str] = description
|
||||
|
||||
if emoji is not None:
|
||||
if isinstance(emoji, str):
|
||||
@ -322,8 +322,8 @@ class SelectOption:
|
||||
else:
|
||||
raise TypeError(f'expected emoji to be str, Emoji, or PartialEmoji not {emoji.__class__}')
|
||||
|
||||
self.emoji = emoji
|
||||
self.default = default
|
||||
self.emoji: Optional[Union[str, Emoji, PartialEmoji]] = emoji
|
||||
self.default: bool = default
|
||||
|
||||
def __repr__(self) -> str:
|
||||
return (
|
||||
|
Reference in New Issue
Block a user