Skip to content

Commit

Permalink
fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
TomAugspurger committed Oct 2, 2024
1 parent 0dba22c commit bf16ef7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/zarr/core/metadata/v2.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ def from_dict(cls, data: dict[str, Any]) -> ArrayV2Metadata:
# extra key in the metadata.
expected = {x.name for x in fields(cls)}
# https://github.com/zarr-developers/zarr-python/issues/2269
# add some extra
# handle the renames
expected |= {"dtype", "chunks"}

_data = {k: v for k, v in _data.items() if k in expected}
Expand Down
2 changes: 1 addition & 1 deletion tests/v3/test_metadata/test_v2.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ def test_from_dict_extra_fields() -> None:
expected = ArrayV2Metadata(
attributes={"key": "value"},
shape=(8,),
data_type="float64",
dtype="float64",
chunk_grid=(8,),
fill_value=0.0,
order="C",
Expand Down

0 comments on commit bf16ef7

Please sign in to comment.