|
25 | 25 | try_parse_parent, |
26 | 26 | ) |
27 | 27 | 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 |
29 | 29 | 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 |
32 | 32 | from modflow_devtools.misc import drop_none_or_empty, try_literal_eval |
33 | 33 |
|
34 | 34 | __all__ = [ |
35 | | - "SCALAR_TYPES", |
36 | 35 | "Block", |
37 | 36 | "Blocks", |
38 | 37 | "Dfn", |
@@ -241,7 +240,7 @@ def _row_field() -> Field: |
241 | 240 | ) |
242 | 241 |
|
243 | 242 | # 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): |
245 | 244 | children = _record_fields() |
246 | 245 | return FieldV2.from_dict( |
247 | 246 | { |
@@ -329,7 +328,7 @@ def _record_fields() -> Fields: |
329 | 328 | # for now, we can tell a var is an array if its type |
330 | 329 | # is scalar and it has a shape. once we have proper |
331 | 330 | # 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: |
333 | 332 | raise TypeError(f"Unsupported array type: {_type}") |
334 | 333 |
|
335 | 334 | else: |
|
0 commit comments