forked from auracaster/bumble_mirror
fix type checker and linter errors
This commit is contained in:
@@ -210,7 +210,7 @@ class SoundDeviceAudioOutput(ThreadedAudioOutput):
|
|||||||
self._stream: sounddevice.RawOutputStream | None = None
|
self._stream: sounddevice.RawOutputStream | None = None
|
||||||
|
|
||||||
async def open(self, pcm_format: PcmFormat) -> None:
|
async def open(self, pcm_format: PcmFormat) -> None:
|
||||||
import sounddevice
|
import sounddevice # pylint: disable=import-error
|
||||||
|
|
||||||
self._stream = sounddevice.RawOutputStream(
|
self._stream = sounddevice.RawOutputStream(
|
||||||
samplerate=pcm_format.sample_rate,
|
samplerate=pcm_format.sample_rate,
|
||||||
@@ -298,7 +298,7 @@ class SubprocessAudioOutput(AudioOutput):
|
|||||||
def check_audio_input(input: str) -> bool:
|
def check_audio_input(input: str) -> bool:
|
||||||
if input == 'device' or input.startswith('device:'):
|
if input == 'device' or input.startswith('device:'):
|
||||||
try:
|
try:
|
||||||
import sounddevice
|
import sounddevice # pylint: disable=import-error
|
||||||
except ImportError as exc:
|
except ImportError as exc:
|
||||||
raise ValueError(
|
raise ValueError(
|
||||||
'audio input not available (sounddevice python module not installed)'
|
'audio input not available (sounddevice python module not installed)'
|
||||||
@@ -511,7 +511,7 @@ class SoundDeviceAudioInput(ThreadedAudioInput):
|
|||||||
self._stream: sounddevice.RawInputStream | None = None
|
self._stream: sounddevice.RawInputStream | None = None
|
||||||
|
|
||||||
def _open(self) -> PcmFormat:
|
def _open(self) -> PcmFormat:
|
||||||
import sounddevice
|
import sounddevice # pylint: disable=import-error
|
||||||
|
|
||||||
self._stream = sounddevice.RawInputStream(
|
self._stream = sounddevice.RawInputStream(
|
||||||
samplerate=self._pcm_format.sample_rate,
|
samplerate=self._pcm_format.sample_rate,
|
||||||
|
|||||||
@@ -192,6 +192,10 @@ ignore_missing_imports = true
|
|||||||
module = "serial_asyncio.*"
|
module = "serial_asyncio.*"
|
||||||
ignore_missing_imports = true
|
ignore_missing_imports = true
|
||||||
|
|
||||||
|
[[tool.mypy.overrides]]
|
||||||
|
module = "sounddevice.*"
|
||||||
|
ignore_missing_imports = true
|
||||||
|
|
||||||
[[tool.mypy.overrides]]
|
[[tool.mypy.overrides]]
|
||||||
module = "usb.*"
|
module = "usb.*"
|
||||||
ignore_missing_imports = true
|
ignore_missing_imports = true
|
||||||
|
|||||||
Reference in New Issue
Block a user