Skip to content

Commit 5472d4b

Browse files
committed
Replace Any by ...
1 parent 86c73be commit 5472d4b

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

sounddevice.py

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

@@ -70,7 +69,7 @@
7069
break
7170
else:
7271
raise OSError('PortAudio library not found')
73-
_lib: _t.Any = _ffi.dlopen(_libname)
72+
_lib: ... = _ffi.dlopen(_libname)
7473
except OSError:
7574
if _platform.system() == 'Darwin':
7675
_libname = 'libportaudio.dylib'
@@ -84,7 +83,7 @@
8483
import _sounddevice_data
8584
_libname = _os.path.join(
8685
next(iter(_sounddevice_data.__path__)), 'portaudio-binaries', _libname)
87-
_lib: _t.Any = _ffi.dlopen(_libname)
86+
_lib: ... = _ffi.dlopen(_libname)
8887

8988
_sampleformats = {
9089
'float32': _lib.paFloat32,
@@ -2659,7 +2658,8 @@ def wait(self, ignore_errors=True):
26592658

26602659

26612660
def _ffi_string(cdata):
2662-
return _t.cast(bytes, _ffi.string(cdata))
2661+
import typing
2662+
return typing.cast(bytes, _ffi.string(cdata))
26632663

26642664

26652665
def _remove_self(d):
@@ -2736,7 +2736,7 @@ def _get_stream_parameters(kind, device, channels, dtype, latency,
27362736
latency = info['default_' + latency + '_' + kind + '_latency']
27372737
if samplerate is None:
27382738
samplerate = info['default_samplerate']
2739-
parameters: _t.Any = _ffi.new('PaStreamParameters*', (
2739+
parameters: ... = _ffi.new('PaStreamParameters*', (
27402740
device, channels, sampleformat, latency,
27412741
extra_settings._streaminfo if extra_settings else _ffi.NULL))
27422742
return parameters, dtype, samplesize, samplerate

0 commit comments

Comments
 (0)