Skip to content

Commit 726c8f9

Browse files
style(pre-commit): auto fixes from pre-commit.com hooks
1 parent fe88ee8 commit 726c8f9

File tree

2 files changed

+14
-10
lines changed

2 files changed

+14
-10
lines changed

discord/opus.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -581,7 +581,9 @@ def run(self):
581581
data.decrypted_data
582582
)
583583
except OpusError:
584-
_log.exception("Error occurred while decoding opus frame.", exc_info=True)
584+
_log.exception(
585+
"Error occurred while decoding opus frame.", exc_info=True
586+
)
585587
continue
586588

587589
self.client.receive_audio(data)

discord/voice/_types.py

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
from __future__ import annotations
2727

2828
from 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

3131
if TYPE_CHECKING:
3232
from typing_extensions import ParamSpec
@@ -39,12 +39,12 @@
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

4646
ClientT = TypeVar("ClientT", bound="Client", covariant=True)
47-
VoiceProtocolT = TypeVar('VoiceProtocolT', bound='VoiceProtocol', covariant=True)
47+
VoiceProtocolT = TypeVar("VoiceProtocolT", bound="VoiceProtocol", covariant=True)
4848

4949

5050
class 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

Comments
 (0)