Skip to content

Commit 4a40de4

Browse files
authored
#345 - Update all method doc strings for raises (#348)
1 parent d112649 commit 4a40de4

11 files changed

Lines changed: 75 additions & 57 deletions

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,13 @@ and this project adheres to [Semantic Versioning].
77

88
## [Unreleased]
99

10+
## [4.0.2] - 2025-08-11
11+
12+
### Changed in 4.0.2
13+
14+
- Documentation updates
15+
- Removed `typing-extensions` dependency
16+
1017
## [4.0.1] - 2025-08-07
1118

1219
### Added in 4.0.1

setup.cfg

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[metadata]
22
name = senzing
3-
version = 4.0.1
3+
version = 4.0.2
44
author = senzing
55
author_email = support@senzing.com
66
description = Python SDK method definitions
@@ -20,8 +20,6 @@ package_dir =
2020
= src
2121
packages = find:
2222
python_requires = >=3.9
23-
install_requires =
24-
typing-extensions >= 4.12.2; python_version<'3.11'
2523

2624
[options.packages.find]
2725
where = src

src/senzing/constants.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,7 @@
1515
"SZ_VERBOSE_LOGGING",
1616
"SZ_WITHOUT_INFO",
1717
]
18-
__version__ = "4.0.0"
19-
__date__ = "2025-08-05"
20-
__updated__ = "2025-08-05"
18+
__updated__ = "2025-08-11"
2119

2220
# -----------------------------------------------------------------------------
2321
# Constant helper values useful for flags

src/senzing/szabstractfactory.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,7 @@
2121
# Metadata
2222

2323
__all__ = ["SzAbstractFactory"]
24-
__version__ = "4.0.1"
25-
__date__ = "2025-08-05"
26-
__updated__ = "2025-08-07"
24+
__updated__ = "2025-08-11"
2725

2826

2927
# -----------------------------------------------------------------------------
@@ -52,6 +50,7 @@ def create_configmanager(self) -> SzConfigManager:
5250
SzConfigManager: A new implementation.
5351
5452
Raises:
53+
SzError
5554
5655
.. collapse:: Example:
5756
@@ -77,6 +76,7 @@ def create_diagnostic(self) -> SzDiagnostic:
7776
SzDiagnostic: A new implementation.
7877
7978
Raises:
79+
SzError
8080
8181
.. collapse:: Example:
8282
@@ -102,6 +102,7 @@ def create_engine(self) -> SzEngine:
102102
SzEngine: A new implementation.
103103
104104
Raises:
105+
SzError
105106
106107
.. collapse:: Example:
107108
@@ -127,6 +128,7 @@ def create_product(self) -> SzProduct:
127128
SzProduct: A new implementation.
128129
129130
Raises:
131+
SzError
130132
131133
.. collapse:: Example:
132134
@@ -148,8 +150,7 @@ def destroy(self) -> None:
148150
AbstractFactory.
149151
150152
Raises:
151-
TypeError: Incorrect datatype of input parameter.
152-
szexception.SzError: config_id does not exist.
153+
SzError
153154
154155
.. collapse:: Example:
155156
@@ -169,8 +170,7 @@ def reinitialize(self, config_id: int) -> None:
169170
config_id (int): The configuration ID used for the initialization
170171
171172
Raises:
172-
TypeError: Incorrect datatype of input parameter.
173-
szexception.SzError: config_id does not exist.
173+
SzError
174174
175175
.. collapse:: Example:
176176

src/senzing/szconfig.py

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,14 @@
22
szconfig.py is the abstract class for all implementations of SzConfig.
33
"""
44

5-
# TODO: Determine specific SzErrors, Errors for "Raises:" documentation.
6-
75
from abc import ABC, abstractmethod
86

97
from .szhelpers import construct_help
108

119
# Metadata
1210

1311
__all__ = ["SzConfig"]
14-
__version__ = "4.0.1"
15-
__date__ = "2025-08-05"
16-
__updated__ = "2025-08-07"
12+
__updated__ = "2025-08-11"
1713

1814
# -----------------------------------------------------------------------------
1915
# SzConfig
@@ -41,7 +37,7 @@ def export(self) -> str:
4137
str: A string containing a JSON Document representation of the Senzing SzConfig object.
4238
4339
Raises:
44-
TypeError: Incorrect datatype of input parameter.
40+
SzError
4541
4642
.. collapse:: Example:
4743
@@ -67,7 +63,7 @@ def get_data_source_registry(self) -> str:
6763
str: A string containing a JSON document listing all of the data sources.
6864
6965
Raises:
70-
TypeError: Incorrect datatype of input parameter.
66+
SzError
7167
7268
.. collapse:: Example:
7369
@@ -97,7 +93,7 @@ def register_data_source(self, data_source_code: str) -> str:
9793
str: A string containing a JSON document listing the newly created data source.
9894
9995
Raises:
100-
TypeError: Incorrect datatype of input parameter.
96+
SzError
10197
10298
.. collapse:: Example:
10399
@@ -129,7 +125,7 @@ def unregister_data_source(self, data_source_code: str) -> str:
129125
data_source_code (str): Name of data source code to delete.
130126
131127
Raises:
132-
TypeError: Incorrect datatype of input parameter.
128+
SzError
133129
134130
.. collapse:: Example:
135131

src/senzing/szconfigmanager.py

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
szconfigmanager.py is the abstract class for all implementations of SzConfigManager.
33
"""
44

5-
# TODO: Determine specific SzErrors, Errors for "Raises:" documentation.
6-
75
from abc import ABC, abstractmethod
86

97
from .szconfig import SzConfig
@@ -12,9 +10,7 @@
1210
# Metadata
1311

1412
__all__ = ["SzConfigManager"]
15-
__version__ = "4.0.1"
16-
__date__ = "2025-08-05"
17-
__updated__ = "2025-08-07"
13+
__updated__ = "2025-08-11"
1814

1915
# -----------------------------------------------------------------------------
2016
# SzConfigManager
@@ -43,7 +39,7 @@ def create_config_from_config_id(self, config_id: int) -> SzConfig:
4339
SzConfig: Represents an in-memory Senzing configuration that can be modified.
4440
4541
Raises:
46-
TypeError: Incorrect datatype of input parameter.
42+
SzError
4743
4844
.. collapse:: Example:
4945
@@ -70,7 +66,7 @@ def create_config_from_string(self, config_definition: str) -> SzConfig:
7066
SzConfig: Represents an in-memory Senzing configuration that can be modified.
7167
7268
Raises:
73-
TypeError: Incorrect datatype of input parameter.
69+
SzError
7470
7571
.. collapse:: Example:
7672
@@ -98,7 +94,7 @@ def create_config_from_template(self) -> SzConfig:
9894
SzConfig: Represents an in-memory Senzing configuration that can be modified.
9995
10096
Raises:
101-
TypeError: Incorrect datatype of input parameter.
97+
SzError
10298
10399
.. collapse:: Example:
104100
@@ -127,7 +123,7 @@ def get_config_registry(self) -> str:
127123
str: A JSON document containing Senzing configurations.
128124
129125
Raises:
130-
TypeError: Incorrect datatype of input parameter.
126+
SzError
131127
132128
.. collapse:: Example:
133129
@@ -155,7 +151,7 @@ def get_default_config_id(self) -> int:
155151
int: The current default configuration ID or zero if the default configuration has not been set.
156152
157153
Raises:
158-
TypeError: Incorrect datatype of input parameter.
154+
SzError
159155
160156
.. collapse:: Example:
161157
@@ -187,7 +183,7 @@ def register_config(self, config_definition: str, config_comment: str) -> int:
187183
int: A configuration identifier.
188184
189185
Raises:
190-
TypeError: Incorrect datatype of input parameter.
186+
SzError
191187
192188
.. collapse:: Example:
193189
@@ -217,7 +213,7 @@ def replace_default_config_id(self, current_default_config_id: int, new_default_
217213
new_default_config_id (int): The configuration identifier to use as the default.
218214
219215
Raises:
220-
TypeError: Incorrect datatype of input parameter.
216+
SzError
221217
222218
.. collapse:: Example:
223219
@@ -239,7 +235,7 @@ def set_default_config(self, config_definition: str, config_comment: str) -> int
239235
config_comment (str): free-form string of comments describing the configuration document.
240236
241237
Raises:
242-
TypeError: Incorrect datatype of input parameter.
238+
SzError
243239
244240
.. collapse:: Example:
245241
@@ -267,7 +263,7 @@ def set_default_config_id(self, config_id: int) -> None:
267263
config_id (int): The configuration identifier of the Senzing Engine configuration to use as the default.
268264
269265
Raises:
270-
TypeError: Incorrect datatype of input parameter.
266+
SzError
271267
272268
.. collapse:: Example:
273269

src/senzing/szdiagnostic.py

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

1111
__all__ = ["SzDiagnostic"]
12-
__version__ = "4.0.1"
13-
__date__ = "2025-08-05"
14-
__updated__ = "2025-08-07"
12+
__updated__ = "2025-08-11"
1513

1614
# -----------------------------------------------------------------------------
1715
# SzDiagnostic
@@ -44,8 +42,7 @@ def check_repository_performance(self, seconds_to_run: int) -> str:
4442
str: A string containing a JSON document.
4543
4644
Raises:
47-
TypeError: Incorrect datatype of input parameter.
48-
szexception.SzError:
45+
SzError
4946
5047
.. collapse:: Example:
5148
@@ -71,7 +68,7 @@ def get_repository_info(self) -> str:
7168
The `get_repository_info` method returns overview information about the repository.
7269
7370
Raises:
74-
szexception.SzError:
71+
SzError
7572
7673
.. collapse:: Example:
7774
@@ -99,6 +96,7 @@ def purge_repository(self) -> None:
9996
The only means of recovery would be restoring from a database backup.
10097
10198
Raises:
99+
SzError
102100
103101
.. collapse:: Example:
104102

0 commit comments

Comments
 (0)