Skip to content

Commit

Permalink
chore: fill tracker object for all fields
Browse files Browse the repository at this point in the history
  • Loading branch information
Olegt0rr committed Oct 30, 2023
1 parent 8501e08 commit 96f7efe
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions yatracker/tracker/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,8 @@ def _add_tracker(tracker: BaseTracker, obj: Any) -> None: # noqa: ANN401
match obj:
case Base():
obj._tracker = tracker # noqa: SLF001
for field in obj.__struct_fields__:
_add_tracker(tracker, getattr(obj, field))
case list():
for o in obj:
_add_tracker(tracker, o)
Expand Down

0 comments on commit 96f7efe

Please sign in to comment.