Skip to content

Commit b490025

Browse files
committed
Steps._data is a cached property
1 parent 8a12305 commit b490025

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/stagpy/stagyydata.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -296,11 +296,14 @@ class Steps:
296296

297297
def __init__(self, sdat: StagyyData):
298298
self.sdat = sdat
299-
self._data: dict[int, Step] = {}
300299

301300
def __repr__(self) -> str:
302301
return f"{self.sdat!r}.steps"
303302

303+
@cached_property
304+
def _data(self) -> dict[int, Step]:
305+
return {}
306+
304307
@typing.overload
305308
def __getitem__(self, istep: int) -> Step: ...
306309

0 commit comments

Comments
 (0)