Commit e7c6ca1
Convert NodeStore from ABC to PEP 544 Protocol
The ``NodeStore`` "abstract interface" had two abstract methods,
no shared state, no ``__init__``, no helpers — by every
operational measure structural rather than nominal. Zero
callers in the codebase use ``isinstance(x, NodeStore)`` or
``issubclass(...)``; ``cluster.py``, ``pool.py``, and the
top-level ``__init__.py`` consume it purely structurally.
Convert to ``Protocol`` so third-party stores need only
implement ``get_nodes`` / ``set_nodes`` without inheriting.
``@runtime_checkable`` keeps ``isinstance`` introspection
available if a future caller needs it.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 61a6487 commit e7c6ca1
1 file changed
Lines changed: 12 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | 3 | | |
5 | 4 | | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | | - | |
43 | | - | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
44 | 53 | | |
45 | | - | |
46 | 54 | | |
47 | 55 | | |
48 | 56 | | |
| |||
58 | 66 | | |
59 | 67 | | |
60 | 68 | | |
61 | | - | |
62 | 69 | | |
63 | 70 | | |
64 | 71 | | |
| |||
0 commit comments