From 2c89202214b6bd7fa5c67fdf3217a1cc7b1ecaf4 Mon Sep 17 00:00:00 2001 From: Rapptz Date: Thu, 17 Feb 2022 09:38:12 -0500 Subject: [PATCH] Fix some minor typing issues --- discord/player.py | 4 ++-- discord/utils.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/discord/player.py b/discord/player.py index 8098d3e35..143e36fb9 100644 --- a/discord/player.py +++ b/discord/player.py @@ -151,7 +151,7 @@ class FFmpegAudio(AudioSource): self._process: subprocess.Popen = self._spawn_process(args, **kwargs) self._stdout: IO[bytes] = self._process.stdout # type: ignore - self._stdin: Optional[IO[Bytes]] = None + self._stdin: Optional[IO[bytes]] = None self._pipe_thread: Optional[threading.Thread] = None if piping: @@ -200,7 +200,7 @@ class FFmpegAudio(AudioSource): self._process.terminate() return try: - self._stdin.write(data) + self._stdin.write(data) # type: ignore except Exception: _log.debug('Write error for %s, this is probably not a problem', self, exc_info=True) # at this point the source data is either exhausted or the process is fubar diff --git a/discord/utils.py b/discord/utils.py index 050e03af8..36d881f05 100644 --- a/discord/utils.py +++ b/discord/utils.py @@ -187,7 +187,7 @@ def cached_slot_property(name: str) -> Callable[[Callable[[T], T_co]], CachedSlo return decorator -class SequenceProxy(Generic[T_co], collections.abc.Sequence): +class SequenceProxy(collections.abc.Sequence[T_co]): """Read-only proxy of a Sequence.""" def __init__(self, proxied: Sequence[T_co]): @@ -538,7 +538,7 @@ async def sane_wait_for(futures, *, timeout): def get_slots(cls: Type[Any]) -> Iterator[str]: for mro in reversed(cls.__mro__): try: - yield from mro.__slots__ + yield from mro.__slots__ # type: ignore except AttributeError: continue