diff --git a/stubs/JACK-Client/METADATA.toml b/stubs/JACK-Client/METADATA.toml index 40a0bac719cf..348052b2d333 100644 --- a/stubs/JACK-Client/METADATA.toml +++ b/stubs/JACK-Client/METADATA.toml @@ -1,7 +1,6 @@ version = "0.5.*" upstream-repository = "https://github.com/spatialaudio/jackclient-python" -# Requires a version of numpy with a `py.typed` file -dependencies = ["numpy>=1.20", "types-cffi"] +dependencies = ["types-cffi"] [tool.stubtest] # darwin and win32 are equivalent diff --git a/stubs/JACK-Client/jack/__init__.pyi b/stubs/JACK-Client/jack/__init__.pyi index 18a33f2cc219..24f02d25d936 100644 --- a/stubs/JACK-Client/jack/__init__.pyi +++ b/stubs/JACK-Client/jack/__init__.pyi @@ -3,9 +3,7 @@ from collections.abc import Callable, Generator, Iterable, Iterator, Sequence from typing import Any, Final, Literal, overload, type_check_only from typing_extensions import Never, Self -import numpy from _cffi_backend import _CDataBase -from numpy.typing import NDArray # Aka jack_position_t # Actual type: _cffi_backend.__CDataOwn @@ -200,6 +198,8 @@ class Port: def set_alias(self, alias: str) -> None: ... def unset_alias(self, alias: str) -> None: ... @property + def type(self) -> str: ... + @property def uuid(self) -> int: ... @property def is_audio(self) -> bool: ... @@ -223,6 +223,12 @@ class MidiPort(Port): @property def is_midi(self) -> Literal[True]: ... +class UnknownPort(Port): + @property + def is_audio(self) -> Literal[False]: ... + @property + def is_midi(self) -> Literal[False]: ... + class OwnPort(Port): @property def number_of_connections(self) -> int: ... @@ -233,7 +239,9 @@ class OwnPort(Port): def disconnect(self, other: str | Port | None = None) -> None: ... def unregister(self) -> None: ... def get_buffer(self) -> _CBufferType: ... - def get_array(self) -> NDArray[numpy.float32]: ... + # Returns a numpy.typing.NDArray[numpy.float32], but JACK-Client no longer + # declares NumPy as a dependency, so we cannot depend on it here. + def get_array(self) -> Any: ... class OwnMidiPort(MidiPort, OwnPort): def __init__(self, port_ptr: _CDataBase, client: Client) -> None: ...