From 180c7010902b3e0ebf2730023f37f1bcc8b5586c Mon Sep 17 00:00:00 2001 From: jorenham Date: Mon, 15 Jun 2026 21:08:50 +0200 Subject: [PATCH] Use a gradual shape-type for the `AudioData` type alias --- soundfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/soundfile.py b/soundfile.py index 6db0b4b6..68cc65f0 100644 --- a/soundfile.py +++ b/soundfile.py @@ -24,7 +24,7 @@ from _soundfile import ffi as _ffi FileDescriptorOrPath: TypeAlias = str | int | BinaryIO | _os.PathLike[Any] -AudioData: TypeAlias = numpy.ndarray[tuple[int, ...], numpy.dtype[numpy.float32 | numpy.float64 | numpy.int32 | numpy.int16]] +AudioData: TypeAlias = numpy.ndarray[tuple[Any, ...], numpy.dtype[numpy.float32 | numpy.float64 | numpy.int32 | numpy.int16]] AudioData_2d: TypeAlias = numpy.ndarray[tuple[int, int], numpy.dtype[numpy.float32 | numpy.float64 | numpy.int32 | numpy.int16]] dtype_str: TypeAlias = Literal['float64', 'float32', 'int32', 'int16'] _snd: Any