diff --git a/flopy/mf6/utils/codegen/dfn.py b/flopy/mf6/utils/codegen/dfn.py index ef0754ddb..00561b7df 100644 --- a/flopy/mf6/utils/codegen/dfn.py +++ b/flopy/mf6/utils/codegen/dfn.py @@ -320,7 +320,6 @@ 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, @@ -328,7 +327,9 @@ def _is_implicit_scalar_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 @@ -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()])}]" }, ) } @@ -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: