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

@ -456,7 +456,7 @@ class Invite(Hashable):
guild: Optional[Union[Guild, Object]] = state._get_guild(guild_id)
channel_id = int(data['channel_id'])
if guild is not None:
channel = guild.get_channel(channel_id) or Object(id=channel_id) # type: ignore
channel = guild.get_channel(channel_id) or Object(id=channel_id)
else:
guild = Object(id=guild_id) if guild_id is not None else None
channel = Object(id=channel_id)
@ -539,7 +539,7 @@ class Invite(Hashable):
return self
async def delete(self, *, reason: Optional[str] = None):
async def delete(self, *, reason: Optional[str] = None) -> None:
"""|coro|
Revokes the instant invite.