Skip to content

Commit

Permalink
other ruff fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
will-moore committed Dec 9, 2024
1 parent 1e37dd2 commit 599eefc
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tests/test_metadata/test_v3.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from zarr.core.buffer import default_buffer_prototype
from zarr.core.chunk_key_encodings import DefaultChunkKeyEncoding, V2ChunkKeyEncoding
from zarr.core.config import config
from zarr.core.group import parse_node_type, GroupMetadata
from zarr.core.group import GroupMetadata, parse_node_type
from zarr.core.metadata.v3 import (
ArrayV3Metadata,
DataType,
Expand Down Expand Up @@ -305,11 +305,12 @@ def test_metadata_to_dict(
assert observed == expected


@pytest.mark.parametrize('indent', [2, 4, None])
@pytest.mark.parametrize("indent", [2, 4, None])
def test_json_indent(indent: int):
with config.set({"json_indent": indent}):
m = GroupMetadata()
d = m.to_buffer_dict(default_buffer_prototype())["zarr.json"].to_bytes()

class TestIndentEncoder(json.JSONEncoder):
def __init__(self, *args: Any, **kwargs: Any) -> None:
super().__init__(*args, **kwargs)
Expand Down

0 comments on commit 599eefc

Please sign in to comment.