Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Nov 7, 2024
1 parent 31584bf commit daa3546
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
8 changes: 3 additions & 5 deletions ome_zarr/format.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from abc import ABC, abstractmethod
from typing import Any, Dict, Iterator, List, Optional

from zarr.storage import RemoteStore, LocalStore
from zarr.storage import LocalStore, RemoteStore

LOGGER = logging.getLogger("ome_zarr.format")

Expand Down Expand Up @@ -147,10 +147,7 @@ def init_store(self, path: str, mode: str = "r") -> RemoteStore:
)
else:
# No other kwargs supported
store = LocalStore(
path,
mode=mode
)
store = LocalStore(path, mode=mode)
LOGGER.debug("Created nested RemoteStore(%s, %s)", path, mode)
return store

Expand Down Expand Up @@ -195,6 +192,7 @@ class FormatV02(FormatV01):
def version(self) -> str:
return "0.2"


class FormatV03(FormatV02): # inherits from V02 to avoid code duplication
"""
Changelog: variable number of dimensions (up to 5),
Expand Down
6 changes: 4 additions & 2 deletions ome_zarr/io.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

import dask.array as da
import zarr
from zarr.storage import RemoteStore, LocalStore, StoreLike
from zarr.storage import LocalStore, RemoteStore, StoreLike

from .format import CurrentFormat, Format, detect_format
from .types import JSONDict
Expand Down Expand Up @@ -52,7 +52,9 @@ def __init__(
if loader is None:
loader = CurrentFormat()
self.__store: RemoteStore = (
path if isinstance(path, RemoteStore) else loader.init_store(self.__path, mode)
path
if isinstance(path, RemoteStore)
else loader.init_store(self.__path, mode)
)
self.__init_metadata()
detected = detect_format(self.__metadata, loader)
Expand Down
4 changes: 2 additions & 2 deletions ome_zarr/writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ def write_multiscale(
compressor=options.get("compressor", None),
# TODO: default dimension_separator? Not set in store for zarr v3
# dimension_separator=group.store.dimension_separator,
dimension_separator = "/",
dimension_separator="/",
compute=compute,
zarr_format=2,
)
Expand Down Expand Up @@ -632,7 +632,7 @@ def _write_dask_image(
compressor=options.pop("compressor", None),
# TODO: default dimension_separator? Not set in store for zarr v3
# dimension_separator=group.store.dimension_separator,
dimension_separator = "/",
dimension_separator="/",
zarr_format=2,
)
)
Expand Down

0 comments on commit daa3546

Please sign in to comment.