Skip to content

Commit ffb5c92

Browse files
committed
fix
1 parent cd5671c commit ffb5c92

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

modflow_devtools/dfn/__init__.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,13 @@
2525
try_parse_parent,
2626
)
2727
from modflow_devtools.dfn.schema.block import Block, Blocks, block_sort_key
28-
from modflow_devtools.dfn.schema.field import SCALAR_TYPES, Field, Fields
28+
from modflow_devtools.dfn.schema.field import Field, Fields
2929
from modflow_devtools.dfn.schema.ref import Ref
30-
from modflow_devtools.dfn.schema.v1 import FieldV1
31-
from modflow_devtools.dfn.schema.v2 import FieldV2
30+
from modflow_devtools.dfn.schema.v1 import FieldV1, SCALAR_TYPES as V1_SCALAR_TYPES
31+
from modflow_devtools.dfn.schema.v2 import FieldV2, SCALAR_TYPES as V2_SCALAR_TYPES
3232
from modflow_devtools.misc import drop_none_or_empty, try_literal_eval
3333

3434
__all__ = [
35-
"SCALAR_TYPES",
3635
"Block",
3736
"Blocks",
3837
"Dfn",
@@ -241,7 +240,7 @@ def _row_field() -> Field:
241240
)
242241

243242
# implicit record with all scalar fields
244-
if all(t in SCALAR_TYPES for t in item_types):
243+
if all(t in V1_SCALAR_TYPES for t in item_types):
245244
children = _record_fields()
246245
return FieldV2.from_dict(
247246
{
@@ -329,7 +328,7 @@ def _record_fields() -> Fields:
329328
# for now, we can tell a var is an array if its type
330329
# is scalar and it has a shape. once we have proper
331330
# typing, this can be read off the type itself.
332-
elif shape is not None and _type not in SCALAR_TYPES:
331+
elif shape is not None and _type not in V1_SCALAR_TYPES:
333332
raise TypeError(f"Unsupported array type: {_type}")
334333

335334
else:

0 commit comments

Comments
 (0)