Skip to content

Commit b6dadbe

Browse files
committed
mypy
1 parent c29ec29 commit b6dadbe

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

flopy4/mf6/spec.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,20 +103,23 @@ def array(
103103
)
104104

105105

106+
Block = dict[str, Attribute]
107+
108+
106109
def blocks(cls) -> list[list[Attribute]]:
107110
"""Return an ordered list of blocks for a component class."""
108111
return [list(v.values()) for v in blocks_dict(cls).values()]
109112

110113

111-
def blocks_dict(cls) -> dict[str, Attribute]:
114+
def blocks_dict(cls) -> dict[str, Block]:
112115
"""
113116
Return an ordered dictionary of blocks for a component class,
114117
whose keys are block names. Each block is a map from variable
115118
(field) name to `attrs.Attribute`.
116119
"""
117120
fields = fields_dict(cls)
118121
fields = {k: v for k, v in fields.items() if "block" in v.metadata}
119-
blocks = {}
122+
blocks: dict[str, Block] = {}
120123
for k, v in fields.items():
121124
block = v.metadata["block"]
122125
if block not in blocks:

0 commit comments

Comments
 (0)