Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
wpbonelli committed Oct 15, 2024
1 parent f0caa86 commit 3d014fa
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions flopy/mf6/utils/codegen/dfn.py
Original file line number Diff line number Diff line change
Expand Up @@ -320,15 +320,16 @@ def _is_implicit_scalar_record():
kind = Var.Kind.List
elif _is_implicit_scalar_record():
fields = _fields(_name)
types = [f.meta["type"] for f in fields.values()]
children = {
_name: Var(
name=_name,
kind=Var.Kind.Record,
block=block,
children=fields,
description=description,
meta={"type": f"[{', '.join(types)}]"},
meta={
"type": f"[{', '.join([f.meta['type'] for f in fields.values()])}]"
},
)
}
kind = Var.Kind.List
Expand All @@ -350,7 +351,7 @@ def _is_implicit_scalar_record():
children=first.children if single else fields,
description=description,
meta={
"type": f"[{', '.join([v.meta["type"] for v in fields.values()])}]"
"type": f"[{', '.join([v.meta['type'] for v in fields.values()])}]"
},
)
}
Expand All @@ -372,7 +373,7 @@ def _is_implicit_scalar_record():
elif _type.startswith("record"):
children = _fields(_name)
kind = Var.Kind.Record
type_ = f"[{', '.join([v.meta["type"] for v in children.values()])}]"
type_ = f"[{', '.join([v.meta['type'] for v in children.values()])}]"

# at this point, if it has a shape, it's an array
elif shape is not None:
Expand Down

0 comments on commit 3d014fa

Please sign in to comment.