Skip to content

Commit 9f385dc

Browse files
authored
decorate all components with xattree (#123)
and update uv/pixi envs to get the latest xattree fixes. for now it requires decorating all classes in the hierarchy. eventually it might get a shortcut to apply to all subclasses.
1 parent 162dfb5 commit 9f385dc

File tree

6 files changed

+992
-741
lines changed

6 files changed

+992
-741
lines changed

flopy4/mf6/exchange.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
from pathlib import Path
22
from typing import Optional
33

4-
from attrs import define
5-
from xattree import field
4+
from xattree import field, xattree
65

76
from flopy4.mf6.package import Package
87

98

10-
@define
9+
@xattree
1110
class Exchange(Package):
1211
exgtype: type = field()
1312
exgfile: Path = field()

flopy4/mf6/model.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
from attrs import define
1+
from xattree import xattree
22

33
from flopy4.mf6.component import Component
44

55

6-
@define
6+
@xattree
77
class Model(Component):
88
pass

flopy4/mf6/package.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
from attrs import define
1+
from xattree import xattree
22

33
from flopy4.mf6.component import Component
44

55

6-
@define
6+
@xattree
77
class Package(Component):
88
pass

flopy4/mf6/solution.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
from attrs import define
1+
from xattree import xattree
22

33
from flopy4.mf6.package import Package
44

55

6-
@define
6+
@xattree
77
class Solution(Package):
88
pass

0 commit comments

Comments
 (0)