Skip to content

Commit 83c9f7d

Browse files
committed
Step is a frozen dataclass
1 parent ee1b903 commit 83c9f7d

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/stagpy/step.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -588,6 +588,7 @@ def bounds(self) -> tuple[float, float]:
588588
return rbot, rbot + thickness
589589

590590

591+
@dataclass(frozen=True)
591592
class Step:
592593
"""Time step data structure.
593594
@@ -612,13 +613,12 @@ class Step:
612613
```
613614
614615
Attributes:
615-
istep (int): the index of the time step that the instance represents.
616-
sdat (StagyyData): the owner of the `Step` instance.
616+
istep: the index of the time step that the instance represents.
617+
sdat: the owner of the `Step` instance.
617618
"""
618619

619-
def __init__(self, istep: int, sdat: StagyyData):
620-
self.istep = istep
621-
self.sdat = sdat
620+
istep: int
621+
sdat: StagyyData
622622

623623
@cached_property
624624
def fields(self) -> Fields:

0 commit comments

Comments
 (0)