Fix type annotations to adhere to latest pyright release

This commit is contained in:
Josh
2022-06-13 05:30:45 +10:00
committed by GitHub
parent 334ef1d7fa
commit c9f777c873
14 changed files with 50 additions and 47 deletions

View File

@ -96,14 +96,14 @@ class AllChannels:
__slots__ = ('guild',)
def __init__(self, guild: Guild):
self.guild = guild
self.guild: Guild = guild
@property
def id(self) -> int:
""":class:`int`: The ID sentinel used to represent all channels. Equivalent to the guild's ID minus 1."""
return self.guild.id - 1
def __repr__(self):
def __repr__(self) -> str:
return f'<AllChannels guild={self.guild}>'