From 4090282da361f503024fe56b50a6cd7738d548f4 Mon Sep 17 00:00:00 2001 From: Avasam Date: Mon, 27 Mar 2023 17:55:32 -0400 Subject: [PATCH] Add default values to `JACK-Client` (#9964) --- stubs/JACK-Client/jack/__init__.pyi | 56 ++++++++++++++--------------- 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/stubs/JACK-Client/jack/__init__.pyi b/stubs/JACK-Client/jack/__init__.pyi index 8d5c1adfd..c3ae62ea0 100644 --- a/stubs/JACK-Client/jack/__init__.pyi +++ b/stubs/JACK-Client/jack/__init__.pyi @@ -63,22 +63,22 @@ class JackError(Exception): ... class JackErrorCode(JackError): def __init__(self, message: str, code: int) -> None: ... - message: str = ... - code: int = ... + message: str + code: int class JackOpenError(JackError): def __init__(self, name: str, status: Status) -> None: ... - name: str = ... - status: Status = ... + name: str + status: Status class Client: def __init__( self, name: str, - use_exact_name: bool = ..., - no_start_server: bool = ..., - servername: str | None = ..., - session_id: str | None = ..., + use_exact_name: bool = False, + no_start_server: bool = False, + servername: str | None = None, + session_id: str | None = None, ) -> None: ... def __enter__(self) -> Self: ... def __exit__(self, *args: Unused) -> None: ... @@ -112,9 +112,9 @@ class Client: def midi_outports(self) -> Ports: ... def owns(self, port: str | Port) -> bool: ... def activate(self) -> None: ... - def deactivate(self, ignore_errors: bool = ...) -> None: ... + def deactivate(self, ignore_errors: bool = True) -> None: ... def cpu_load(self) -> float: ... - def close(self, ignore_errors: bool = ...) -> None: ... + def close(self, ignore_errors: bool = True) -> None: ... def connect(self, source: str | Port, destination: str | Port) -> None: ... def disconnect(self, source: str | Port, destination: str | Port) -> None: ... def transport_start(self) -> None: ... @@ -138,20 +138,20 @@ class Client: def set_samplerate_callback(self, callback: Callable[[int], object]) -> None: ... def set_client_registration_callback(self, callback: Callable[[str, bool], object]) -> None: ... def set_port_registration_callback( - self, callback: Callable[[Port, bool], object] | None = ..., only_available: bool = ... + self, callback: Callable[[Port, bool], object] | None = None, only_available: bool = True ) -> None: ... def set_port_connect_callback( - self, callback: Callable[[Port, Port, bool], object] | None = ..., only_available: bool = ... + self, callback: Callable[[Port, Port, bool], object] | None = None, only_available: bool = True ) -> None: ... def set_port_rename_callback( - self, callback: Callable[[Port, str, str], object] | None = ..., only_available: bool = ... + self, callback: Callable[[Port, str, str], object] | None = None, only_available: bool = True ) -> None: ... def set_graph_order_callback(self, callback: Callable[[], object]) -> None: ... def set_xrun_callback(self, callback: Callable[[float], object]) -> None: ... def set_sync_callback(self, callback: Callable[[int, _JackPositionT], object] | None) -> None: ... def release_timebase(self) -> None: ... def set_timebase_callback( - self, callback: Callable[[int, int, _JackPositionT, bool], object] | None = ..., conditional: bool = ... + self, callback: Callable[[int, int, _JackPositionT, bool], object] | None = None, conditional: bool = False ) -> bool: ... def set_property_change_callback(self, callback: Callable[[int, str, int], object]) -> None: ... def get_uuid_for_client_name(self, name: str) -> str: ... @@ -160,16 +160,16 @@ class Client: def get_all_connections(self, port: Port) -> list[Port]: ... def get_ports( self, - name_pattern: str = ..., - is_audio: bool = ..., - is_midi: bool = ..., - is_input: bool = ..., - is_output: bool = ..., - is_physical: bool = ..., - can_monitor: bool = ..., - is_terminal: bool = ..., + name_pattern: str = "", + is_audio: bool = False, + is_midi: bool = False, + is_input: bool = False, + is_output: bool = False, + is_physical: bool = False, + can_monitor: bool = False, + is_terminal: bool = False, ) -> list[Port]: ... - def set_property(self, subject: int | str, key: str, value: str | bytes, type: str = ...) -> None: ... + def set_property(self, subject: int | str, key: str, value: str | bytes, type: str = "") -> None: ... def remove_property(self, subject: int | str, key: str) -> None: ... def remove_properties(self, subject: int | str) -> int: ... def remove_all_properties(self) -> None: ... @@ -220,7 +220,7 @@ class OwnPort(Port): def connections(self) -> list[Port]: ... def is_connected_to(self, port: str | Port) -> bool: ... def connect(self, port: str | Port) -> None: ... - def disconnect(self, other: str | Port | None = ...) -> None: ... + 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]: ... @@ -245,7 +245,7 @@ class Ports: def __len__(self) -> int: ... def __getitem__(self, name: str) -> Port: ... def __iter__(self) -> Iterator[Port]: ... - def register(self, shortname: str, is_terminal: bool = ..., is_physical: bool = ...) -> Port: ... + def register(self, shortname: str, is_terminal: bool = False, is_physical: bool = False) -> Port: ... def clear(self) -> None: ... class RingBuffer: @@ -264,7 +264,7 @@ class RingBuffer: def read_buffers(self) -> tuple[_CBufferType, _CBufferType]: ... def read_advance(self, size: int) -> None: ... def mlock(self) -> None: ... - def reset(self, size: int | None = ...) -> None: ... + def reset(self, size: int | None = None) -> None: ... @property def size(self) -> int: ... @@ -312,8 +312,8 @@ def version() -> tuple[int, int, int, int]: ... def version_string() -> str: ... def client_name_size() -> int: ... def port_name_size() -> int: ... -def set_error_function(callback: Callable[[str], object] | None = ...) -> None: ... -def set_info_function(callback: Callable[[str], object] | None = ...) -> None: ... +def set_error_function(callback: Callable[[str], object] | None = None) -> None: ... +def set_info_function(callback: Callable[[str], object] | None = None) -> None: ... def client_pid(name: str) -> int: ... METADATA_CONNECTED: str