Skip to content

Commit

Permalink
fix pre-commit
Browse files Browse the repository at this point in the history
  • Loading branch information
rabernat committed May 26, 2024
1 parent 523efba commit 07aab24
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
2 changes: 1 addition & 1 deletion zarr/codecs.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# flake8: noqa
from numcodecs import *
from numcodecs import get_codec, Blosc, Pickle, Zlib, Delta, AsType, BZ2
from numcodecs import get_codec, Blosc, Pickle, Zlib, Zstd, Delta, AsType, BZ2
from numcodecs.registry import codec_registry
18 changes: 11 additions & 7 deletions zarr/tests/test_meta.py
Original file line number Diff line number Diff line change
Expand Up @@ -270,10 +270,10 @@ def test_encode_decode_array_dtype_shape():

@pytest.mark.parametrize("cname", ["zlib", "zstd"])
def test_encode_decode_array_dtype_shape_v3(cname):
if cname=="zlib":
compressor=Zlib(1)
elif cname=="zstd":
compressor=Zstd(1)
if cname == "zlib":
compressor = Zlib(1)
elif cname == "zstd":
compressor = Zstd(1)
meta = dict(
shape=(100,),
chunk_grid=dict(type="regular", chunk_shape=(10,), separator=("/")),
Expand All @@ -283,7 +283,8 @@ def test_encode_decode_array_dtype_shape_v3(cname):
chunk_memory_layout="C",
)

meta_json = """{
meta_json = (
"""{
"attributes": {},
"chunk_grid": {
"chunk_shape": [10],
Expand All @@ -292,9 +293,11 @@ def test_encode_decode_array_dtype_shape_v3(cname):
},
"chunk_memory_layout": "C",
"compressor": {
""" + f"""
"""
+ f"""
"codec": "https://purl.org/zarr/spec/codec/{cname}/1.0",
""" + """
"""
+ """
"configuration": {
"level": 1
}
Expand All @@ -304,6 +307,7 @@ def test_encode_decode_array_dtype_shape_v3(cname):
"fill_value": null,
"shape": [100, 10, 10 ]
}"""
)

# test encoding
meta_enc = Metadata3.encode_array_metadata(meta)
Expand Down

0 comments on commit 07aab24

Please sign in to comment.