Skip to content

Commit 3d07ec5

Browse files
authored
Put back parse_data_type import (#3292)
1 parent a4e9660 commit 3d07ec5

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

src/zarr/dtype.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@
3838
VariableLengthUTF8JSON_V2,
3939
ZDType,
4040
data_type_registry,
41+
# Import for backwards compatibility, but not included in __all__
42+
# so it doesn't show up in the docs
43+
parse_data_type, # noqa: F401
4144
parse_dtype,
4245
)
4346

tests/test_dtype_registry.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,18 +13,20 @@
1313
from zarr.core.config import config
1414
from zarr.core.dtype import (
1515
AnyDType,
16-
Bool,
1716
DataTypeRegistry,
18-
FixedLengthUTF32,
1917
TBaseDType,
2018
TBaseScalar,
19+
get_data_type_from_json,
20+
)
21+
from zarr.core.dtype.common import unpack_dtype_json
22+
from zarr.dtype import ( # type: ignore[attr-defined]
23+
Bool,
24+
FixedLengthUTF32,
2125
ZDType,
2226
data_type_registry,
23-
get_data_type_from_json,
2427
parse_data_type,
2528
parse_dtype,
2629
)
27-
from zarr.core.dtype.common import unpack_dtype_json
2830

2931
if TYPE_CHECKING:
3032
from collections.abc import Generator

0 commit comments

Comments
 (0)