Skip to content

Commit a6f265a

Browse files
committed
refactor: split ObjectStateRegistry into its own module
Extract ObjectStateRegistry (1434 lines) from object_state.py (3591 lines) into object_state_registry.py. object_state.py now contains only FieldProxy and ObjectState (2167 lines). Circular import avoided: registry uses TYPE_CHECKING import for ObjectState (string annotations only), object_state.py imports ObjectStateRegistry at runtime. __init__.py re-exports from both modules.
1 parent c98be98 commit a6f265a

File tree

3 files changed

+1440
-1427
lines changed

3 files changed

+1440
-1427
lines changed

src/objectstate/__init__.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@
6868
'config',
6969
'live_context_resolver',
7070
'token_cache',
71+
'object_state_registry',
7172
'object_state',
7273
'snapshot_model',
7374
'parametric_axes',
@@ -222,7 +223,8 @@
222223

223224

224225
# Object state management
225-
from objectstate.object_state import ObjectState, ObjectStateRegistry
226+
from objectstate.object_state_registry import ObjectStateRegistry
227+
from objectstate.object_state import ObjectState
226228

227229
# Snapshot model for time-travel
228230
from objectstate.snapshot_model import Snapshot, StateSnapshot, Timeline

0 commit comments

Comments
 (0)