55from importlib .metadata import entry_points as get_entry_points
66from typing import TYPE_CHECKING , Any , Generic , TypeVar
77
8- from zarr .abc .codec import ArrayArrayCodec , ArrayBytesCodec , BytesBytesCodec
98from zarr .core .config import BadConfigError , config
109
1110if TYPE_CHECKING :
1211 from importlib .metadata import EntryPoint
1312
14- from zarr .abc .codec import Codec , CodecPipeline
13+ from zarr .abc .codec import (
14+ ArrayArrayCodec ,
15+ ArrayBytesCodec ,
16+ BytesBytesCodec ,
17+ Codec ,
18+ CodecPipeline ,
19+ )
1520 from zarr .core .buffer import Buffer , NDBuffer
1621 from zarr .core .common import JSON
1722
@@ -167,6 +172,8 @@ def _parse_bytes_bytes_codec(data: dict[str, JSON] | Codec) -> BytesBytesCodec:
167172 If the input is already a ``BytesBytesCodec``, it is returned as is. If the input is a dict, it
168173 is converted to a ``BytesBytesCodec`` instance via the ``_resolve_codec`` function.
169174 """
175+ from zarr .abc .codec import BytesBytesCodec
176+
170177 if isinstance (data , dict ):
171178 result = _resolve_codec (data )
172179 if not isinstance (result , BytesBytesCodec ):
@@ -185,6 +192,8 @@ def _parse_array_bytes_codec(data: dict[str, JSON] | ArrayBytesCodec) -> ArrayBy
185192 If the input is already a ``ArrayBytesCodec``, it is returned as is. If the input is a dict, it
186193 is converted to a ``ArrayBytesCodec`` instance via the ``_resolve_codec`` function.
187194 """
195+ from zarr .abc .codec import ArrayBytesCodec
196+
188197 if isinstance (data , dict ):
189198 result = _resolve_codec (data )
190199 if not isinstance (result , ArrayBytesCodec ):
@@ -201,6 +210,8 @@ def _parse_array_array_codec(data: dict[str, JSON] | Codec) -> ArrayArrayCodec:
201210 If the input is already a ``ArrayArrayCodec``, it is returned as is. If the input is a dict, it
202211 is converted to a ``ArrayArrayCodec`` instance via the ``_resolve_codec`` function.
203212 """
213+ from zarr .abc .codec import ArrayArrayCodec
214+
204215 if isinstance (data , dict ):
205216 result = _resolve_codec (data )
206217 if not isinstance (result , ArrayArrayCodec ):
0 commit comments