Skip to content

Commit

Permalink
use typing.Mapping
Browse files Browse the repository at this point in the history
  • Loading branch information
madsbk committed Apr 11, 2023
1 parent c3ee95f commit ec5f396
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions zarr/util.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import collections.abc
import inspect
import json
import math
Expand All @@ -11,6 +10,7 @@
Callable,
Dict,
Iterator,
Mapping,
Optional,
Tuple,
TypeVar,
Expand Down Expand Up @@ -760,7 +760,7 @@ def ensure_contiguous_ndarray_or_bytes(buf) -> Union[NDArrayLike, bytes]:
return ensure_bytes(buf)


class ConstantMap(collections.abc.Mapping[KeyType, ValueType]):
class ConstantMap(Mapping[KeyType, ValueType]):
"""A read-only map that maps all keys to the same constant value
Useful if you want to call `getitems()` with the same context for all keys.
Expand Down

0 comments on commit ec5f396

Please sign in to comment.