Skip to content

Commit

Permalink
Move explanation note for type ignore above the offending line
Browse files Browse the repository at this point in the history
  • Loading branch information
Rapptz committed Aug 18, 2021
1 parent 28ed599 commit 17f0b59
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion discord/template.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,8 @@ def _store(self, data: TemplatePayload) -> None:
source_serialised = data['serialized_source_guild']
source_serialised['id'] = guild_id
state = _PartialTemplateState(state=self._state)
self.source_guild = Guild(data=source_serialised, state=state) # type: ignore - Guild expects a ConnectionState, we're passing a _PartialTemplateState
# Guild expects a ConnectionState, we're passing a _PartialTemplateState
self.source_guild = Guild(data=source_serialised, state=state) # type: ignore
else:
self.source_guild = guild

Expand Down

0 comments on commit 17f0b59

Please sign in to comment.