Skip to content

Commit 33e5582

Browse files
committed
Tracers._data is a cached property
1 parent 7c93aff commit 33e5582

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/stagpy/step.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -425,7 +425,10 @@ class Tracers:
425425

426426
def __init__(self, step: Step):
427427
self.step = step
428-
self._data: dict[str, list[NDArray] | None] = {}
428+
429+
@cached_property
430+
def _data(self) -> dict[str, list[NDArray] | None]:
431+
return {}
429432

430433
def __getitem__(self, name: str) -> list[NDArray] | None:
431434
if name in self._data:

0 commit comments

Comments
 (0)