Skip to content

Commit 30cf169

Browse files
committed
Snaps._isteps is a cached property
1 parent 18d9b99 commit 30cf169

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
@@ -390,12 +390,15 @@ class Snaps:
390390

391391
def __init__(self, sdat: StagyyData):
392392
self.sdat = sdat
393-
self._isteps: dict[int, int | None] = {}
394393
self._all_isteps_known = False
395394

396395
def __repr__(self) -> str:
397396
return f"{self.sdat!r}.snaps"
398397

398+
@cached_property
399+
def _isteps(self) -> dict[int, int | None]:
400+
return {}
401+
399402
@typing.overload
400403
def __getitem__(self, istep: int) -> Step: ...
401404

0 commit comments

Comments
 (0)