Skip to content

Commit fc92919

Browse files
committed
Bump version, fix return types in docstrings
1 parent bb0d811 commit fc92919

4 files changed

Lines changed: 11 additions & 11 deletions

File tree

camilladsp/config.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ def parse_yaml(self, config_string: str) -> Dict:
108108
config_string (str): A config as raw yaml string.
109109
110110
Returns:
111-
Dict | None: Parsed config as a Python dict.
111+
Dict: Parsed config as a Python dict.
112112
"""
113113
config_raw = self.client.query("ReadConfig", arg=config_string)
114114
config_object = yaml.safe_load(config_raw)
@@ -123,7 +123,7 @@ def parse_json(self, config_string: str) -> Dict:
123123
config_string (str): A config as raw json string.
124124
125125
Returns:
126-
Dict | None: Parsed config as a Python dict.
126+
Dict: Parsed config as a Python dict.
127127
"""
128128
config_raw = self.client.query("ReadConfigJson", arg=config_string)
129129
config_object = json.loads(config_raw)
@@ -137,7 +137,7 @@ def read_and_parse_file(self, filename: str) -> Dict:
137137
filename (str): Path to a config file.
138138
139139
Returns:
140-
Dict | None: Parsed config as a Python dict.
140+
Dict: Parsed config as a Python dict.
141141
"""
142142
config_raw = self.client.query("ReadConfigFile", arg=filename)
143143
config = yaml.safe_load(config_raw)
@@ -193,7 +193,7 @@ def validate(self, config_object: Dict) -> Dict:
193193
config_object (Dict): A configuration as a Python dict.
194194
195195
Returns:
196-
Dict | None: Validated config as a Python dict.
196+
Dict: Validated config as a Python dict.
197197
"""
198198
config_string = yaml.dump(config_object)
199199
validated_string = self.validate_yaml(config_string)

camilladsp/general.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ def list_playback_devices(self, value: str) -> List[Tuple[str, str]]:
120120
For some backends, those two names are identical.
121121
122122
Returns:
123-
List[Tuple[str, str]: A list containing tuples of two strings,
123+
List[Tuple[str, str]]: A list containing tuples of two strings,
124124
with system device name and a descriptive name.
125125
"""
126126
devs = self.client.query("GetAvailablePlaybackDevices", arg=value)
@@ -134,7 +134,7 @@ def list_capture_devices(self, value: str) -> List[Tuple[str, str]]:
134134
For some backends, those two names are identical.
135135
136136
Returns:
137-
List[Tuple[str, str]: A list containing tuples of two strings,
137+
List[Tuple[str, str]]: A list containing tuples of two strings,
138138
with system device name and a descriptive name.
139139
"""
140140
devs = self.client.query("GetAvailableCaptureDevices", arg=value)

camilladsp/ratemonitor.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ def capture(self) -> Optional[int]:
3131
Returns the nearest common rate, as long as it's within +-4% of the measured value.
3232
3333
Returns:
34-
int: The current capture rate.
34+
int | None: The current capture rate, or None if not within +-4% of a standard rate.
3535
"""
3636
rate = self.capture_raw()
3737
if 0.96 * _STANDARD_RATES[0] < rate < 1.04 * _STANDARD_RATES[-1]:

camilladsp/versions.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
from .commandgroup import _CommandGroup
1111

12-
VERSION = "4.0.0"
12+
VERSION = "4.1.0"
1313

1414

1515
class Versions(_CommandGroup):
@@ -22,8 +22,8 @@ def camilladsp(self) -> Optional[Tuple[str, str, str]]:
2222
Read CamillaDSP version.
2323
2424
Returns:
25-
Tuple[List[str], List[str]] | None: A tuple containing the CamillaDSP version,
26-
as (major, minor, patch).
25+
Tuple[str, str, str] | None: A tuple containing the CamillaDSP version,
26+
as (major, minor, patch), or None if not connected.
2727
"""
2828
return self.client.cdsp_version
2929

@@ -32,7 +32,7 @@ def library(self) -> Tuple[str, str, str]:
3232
Read pyCamillaDSP library version.
3333
3434
Returns:
35-
Tuple[List[str], List[str]] | None: A tuple containing the pyCamillaDSP version,
35+
Tuple[str, str, str]: A tuple containing the pyCamillaDSP version,
3636
as (major, minor, patch).
3737
"""
3838
ver = VERSION.split(".", 2)

0 commit comments

Comments
 (0)