diff --git a/platypush/plugins/sound/_converters/_base.py b/platypush/plugins/sound/_converters/_base.py index 1a738f3ac9..efa19fcf44 100644 --- a/platypush/plugins/sound/_converters/_base.py +++ b/platypush/plugins/sound/_converters/_base.py @@ -4,7 +4,7 @@ from asyncio.subprocess import PIPE from logging import getLogger from queue import Empty, Queue from threading import Event, RLock, Thread -from typing import Any, Callable, Coroutine, Iterable, Optional, Self +from typing import Any, Callable, Coroutine, Iterable, Optional from platypush.context import get_or_create_event_loop @@ -87,7 +87,7 @@ class AudioConverter(Thread, ABC): self._on_exit = on_exit self._ffmpeg_terminated = Event() - def __enter__(self) -> Self: + def __enter__(self) -> "AudioConverter": """ Audio converter context manager. diff --git a/platypush/plugins/sound/_streams/_player/_base.py b/platypush/plugins/sound/_streams/_player/_base.py index b2a324a2d3..6b4a122125 100644 --- a/platypush/plugins/sound/_streams/_player/_base.py +++ b/platypush/plugins/sound/_streams/_player/_base.py @@ -1,5 +1,5 @@ from abc import ABC -from typing import IO, Iterable, List, Optional, Self, Type, Union +from typing import IO, Iterable, List, Optional, Type, Union from typing_extensions import override import numpy as np @@ -39,7 +39,7 @@ class AudioPlayer(AudioThread, ABC): infile: Optional[str] = None, sound: Optional[Union[dict, Iterable[dict]]] = None, **kwargs, - ) -> Self: + ) -> "AudioPlayer": from ._resource import AudioResourcePlayer from ._synth import AudioSynthPlayer, Sound