mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-04-21 08:17:47 +00:00
Fix some minor typing issues
This commit is contained in:
parent
3113036a54
commit
2c89202214
@ -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
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user