Handle type-errors in upcoming pyright release

This commit is contained in:
Josh
2022-02-22 23:51:11 +10:00
committed by GitHub
parent ff90e7e747
commit a315786869
5 changed files with 12 additions and 11 deletions

View File

@ -563,7 +563,7 @@ class VoiceClient(VoiceProtocol):
return header + box.encrypt(bytes(data), bytes(nonce)).ciphertext + nonce[:4]
def play(self, source: AudioSource, *, after: Callable[[Optional[Exception]], Any] = None) -> None:
def play(self, source: AudioSource, *, after: Optional[Callable[[Optional[Exception]], Any]] = None) -> None:
"""Plays an :class:`AudioSource`.
The finalizer, ``after`` is called after the source has been exhausted