Skip to content

Commit ba56936

Browse files
zeevdrclaude
andcommitted
refactor: remove ConfigValue from public API
No SDK method returned or accepted ConfigValue — it was a dead export. Removed the class from types.py, the import and __all__ entry in __init__.py, and the corresponding test. Closes #73 Co-Authored-By: Claude <noreply@anthropic.com>
1 parent cb495ad commit ba56936

3 files changed

Lines changed: 2 additions & 28 deletions

File tree

sdk/src/opendecree/__init__.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
UnavailableError,
3030
UnimplementedError,
3131
)
32-
from opendecree.types import Change, ConfigValue, FieldUpdate, ServerVersion
32+
from opendecree.types import Change, FieldUpdate, ServerVersion
3333
from opendecree.watcher import ConfigWatcher, WatchedField
3434

3535
__all__ = [
@@ -44,7 +44,6 @@
4444
"Change",
4545
"ChecksumMismatchError",
4646
"ConfigClient",
47-
"ConfigValue",
4847
"ConfigWatcher",
4948
"DecreeError",
5049
"FieldUpdate",

sdk/src/opendecree/types.py

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -8,23 +8,6 @@
88
from dataclasses import dataclass
99

1010

11-
@dataclass(frozen=True, slots=True)
12-
class ConfigValue:
13-
"""A single configuration value.
14-
15-
Attributes:
16-
field_path: Dot-separated field path (e.g., ``"payments.fee"``).
17-
value: The raw string value.
18-
checksum: xxHash checksum of the value.
19-
description: Optional description set when the value was written.
20-
"""
21-
22-
field_path: str
23-
value: str
24-
checksum: str
25-
description: str = ""
26-
27-
2811
@dataclass(frozen=True, slots=True)
2912
class Change:
3013
"""A configuration change event from a subscription.

sdk/tests/test_types.py

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,6 @@
11
"""Tests for public data types."""
22

3-
from opendecree.types import Change, ConfigValue, ServerVersion
4-
5-
6-
def test_config_value_frozen():
7-
cv = ConfigValue(field_path="a.b", value="1", checksum="abc")
8-
assert cv.field_path == "a.b"
9-
assert cv.value == "1"
10-
assert cv.checksum == "abc"
11-
assert cv.description == ""
3+
from opendecree.types import Change, ServerVersion
124

135

146
def test_change():

0 commit comments

Comments
 (0)