2626from __future__ import annotations
2727
2828from collections .abc import Awaitable , Callable
29- from typing import TYPE_CHECKING , Any , Generic , TypeVar , Union
29+ from typing import TYPE_CHECKING , Generic , TypeVar , Union
3030
3131if TYPE_CHECKING :
3232 from typing_extensions import ParamSpec
3939 )
4040 from discord .sinks import Sink
4141
42- P = ParamSpec ('P' )
43- R = TypeVar ('R' )
42+ P = ParamSpec ("P" )
43+ R = TypeVar ("R" )
4444 RecordCallback = Union [Callable [P , R ], Callable [P , Awaitable [R ]]]
4545
4646ClientT = TypeVar ("ClientT" , bound = "Client" , covariant = True )
47- VoiceProtocolT = TypeVar (' VoiceProtocolT' , bound = ' VoiceProtocol' , covariant = True )
47+ VoiceProtocolT = TypeVar (" VoiceProtocolT" , bound = " VoiceProtocol" , covariant = True )
4848
4949
5050class VoiceProtocol (Generic [ClientT ]):
@@ -195,7 +195,9 @@ class VoiceRecorderProtocol(Generic[VoiceProtocolT]):
195195 :attr:`VoiceProtocol.channel`
196196 """
197197
198- def __init__ (self , client : VoiceProtocolT , channel : abc .Connectable | None = None ) -> None :
198+ def __init__ (
199+ self , client : VoiceProtocolT , channel : abc .Connectable | None = None
200+ ) -> None :
199201 self .client : VoiceProtocolT = client
200202 self .channel : abc .Connectable = channel or client .channel
201203
@@ -212,7 +214,7 @@ def get_ssrc(self, user_id: int) -> int:
212214 :class:`int`
213215 The ssrc for the provided user ID.
214216 """
215- raise NotImplementedError (' subclasses must implement this' )
217+ raise NotImplementedError (" subclasses must implement this" )
216218
217219 def unpack (self , data : bytes ) -> bytes | None :
218220 """Takes an audio packet received from Discord and decodes it.
@@ -227,7 +229,7 @@ def unpack(self, data: bytes) -> bytes | None:
227229 Optional[:class:`bytes`]
228230 The unpacked bytes, or ``None`` if they could not be unpacked.
229231 """
230- raise NotImplementedError (' subclasses must implement this' )
232+ raise NotImplementedError (" subclasses must implement this" )
231233
232234 def record (
233235 self ,
@@ -259,8 +261,8 @@ def record(
259261 TypeError
260262 You did not pass a Sink object.
261263 """
262- raise NotImplementedError (' subclasses must implement this' )
264+ raise NotImplementedError (" subclasses must implement this" )
263265
264266 def stop (self ) -> None :
265267 """Stops recording."""
266- raise NotImplementedError (' subclasses must implement this' )
268+ raise NotImplementedError (" subclasses must implement this" )
0 commit comments