Skip to content

Commit

Permalink
Merge branch 'master' into working
Browse files Browse the repository at this point in the history
  • Loading branch information
Dorukyum committed Jan 21, 2024
2 parents 90430f7 + 0cd9ac9 commit 6520bf0
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 6 deletions.
26 changes: 23 additions & 3 deletions discord/voice_client.py
Expand Up @@ -46,7 +46,7 @@
import struct
import threading
import time
from typing import TYPE_CHECKING, Any, Callable
from typing import TYPE_CHECKING, Any, Callable, Literal, overload

from . import opus, utils
from .backoff import ExponentialBackoff
Expand Down Expand Up @@ -623,13 +623,33 @@ def get_ssrc(self, user_id):
user_id
]

@overload
def play(
self,
source: AudioSource,
*,
after: Callable[[Exception | None], Any] = None,
wait_finish: bool = False,
after: Callable[[Exception | None], Any] | None = None,
wait_finish: Literal[False] = False,
) -> None:
...

@overload
def play(
self,
source: AudioSource,
*,
after: Callable[[Exception | None], Any] | None = None,
wait_finish: Literal[True],
) -> asyncio.Future:
...

def play(
self,
source: AudioSource,
*,
after: Callable[[Exception | None], Any] | None = None,
wait_finish: bool = False,
) -> None | asyncio.Future:
"""Plays an :class:`AudioSource`.
The finalizer, ``after`` is called after the source has been exhausted
Expand Down
6 changes: 3 additions & 3 deletions requirements/dev.txt
@@ -1,11 +1,11 @@
-r _.txt
pylint~=3.0.3
pytest~=7.4.3
pytest-asyncio~=0.23.2
pytest~=7.4.4
pytest-asyncio~=0.23.3
# pytest-order~=1.0.1
mypy~=1.8.0
coverage~=7.4
pre-commit==3.5.0
codespell==2.2.6
bandit==1.7.6
flake8==6.1.0
flake8==7.0.0

0 comments on commit 6520bf0

Please sign in to comment.