Skip to content

Commit 3c8f6b7

Browse files
committed
use Any for PortAudio library
1 parent dfb8d23 commit 3c8f6b7

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

sounddevice.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@
5454
import os as _os
5555
import platform as _platform
5656
import sys as _sys
57+
import typing as _t
5758
from ctypes.util import find_library as _find_library
5859
from _sounddevice import ffi as _ffi
5960

@@ -69,7 +70,7 @@
6970
break
7071
else:
7172
raise OSError('PortAudio library not found')
72-
_lib = _ffi.dlopen(_libname)
73+
_lib: _t.Any = _ffi.dlopen(_libname)
7374
except OSError:
7475
if _platform.system() == 'Darwin':
7576
_libname = 'libportaudio.dylib'
@@ -83,7 +84,7 @@
8384
import _sounddevice_data
8485
_libname = _os.path.join(
8586
next(iter(_sounddevice_data.__path__)), 'portaudio-binaries', _libname)
86-
_lib = _ffi.dlopen(_libname)
87+
_lib: _t.Any = _ffi.dlopen(_libname)
8788

8889
_sampleformats = {
8990
'float32': _lib.paFloat32,

0 commit comments

Comments
 (0)