diff --git a/src/npe2/types.py b/src/npe2/types.py index 3f649005..da7e72ba 100644 --- a/src/npe2/types.py +++ b/src/npe2/types.py @@ -1,7 +1,7 @@ +from collections.abc import Mapping from typing import ( TYPE_CHECKING, Callable, - Dict, List, Literal, NewType, @@ -48,7 +48,7 @@ def __array__(self) -> "np.ndarray": LayerName = Literal[ "graph", "image", "labels", "points", "shapes", "surface", "tracks", "vectors" ] -Metadata = Dict +Metadata = Mapping DataType = Union[ArrayLike, Sequence[ArrayLike]] FullLayerData = Tuple[DataType, Metadata, LayerName] LayerData = Union[Tuple[DataType], Tuple[DataType, Metadata], FullLayerData]