Skip to content

Commit 64a8a17

Browse files
committed
RpofsAveraged._cached_data is a cached property
1 parent 85a4382 commit 64a8a17

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
@@ -234,7 +234,10 @@ class RprofsAveraged(step.Rprofs):
234234

235235
def __init__(self, steps: StepsView):
236236
self.steps = steps.filter(rprofs=True)
237-
self._cached_data: dict[str, dt.Rprof] = {}
237+
238+
@cached_property
239+
def _cached_data(self) -> dict[str, dt.Rprof]:
240+
return {}
238241

239242
def __getitem__(self, name: str) -> dt.Rprof:
240243
# the averaging method has two shortcomings:

0 commit comments

Comments
 (0)