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

@ -126,9 +126,11 @@ class WelcomeScreen:
self._store(data)
def _store(self, data: WelcomeScreenPayload) -> None:
self.description = data['description']
self.description: str = data['description']
welcome_channels = data.get('welcome_channels', [])
self.welcome_channels = [WelcomeChannel._from_dict(data=wc, guild=self._guild) for wc in welcome_channels]
self.welcome_channels: List[WelcomeChannel] = [
WelcomeChannel._from_dict(data=wc, guild=self._guild) for wc in welcome_channels
]
def __repr__(self) -> str:
return f'<WelcomeScreen description={self.description!r} welcome_channels={self.welcome_channels!r} enabled={self.enabled}>'