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 Sep 21, 2024
1 parent cc585d0 commit 9302036
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
6 changes: 3 additions & 3 deletions xarray/backends/zarr.py
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ def extract_zarr_variable_encoding(
safe_chunks=True,
region=None,
mode=None,
shape=None
shape=None,
):
"""
Extract zarr encoding dictionary from xarray Variable
Expand Down Expand Up @@ -341,7 +341,7 @@ def extract_zarr_variable_encoding(
safe_chunks=safe_chunks,
region=region,
mode=mode,
shape=shape
shape=shape,
)
encoding["chunks"] = chunks
return encoding
Expand Down Expand Up @@ -881,7 +881,7 @@ def set_variables(self, variables, check_encoding_set, writer, unlimited_dims=No
safe_chunks=self._safe_chunks,
region=region,
mode=self._mode,
shape=zarr_shape
shape=zarr_shape,
)

if name not in existing_keys:
Expand Down
2 changes: 0 additions & 2 deletions xarray/tests/test_backends.py
Original file line number Diff line number Diff line change
Expand Up @@ -6254,5 +6254,3 @@ def test_zarr_safe_chunk_region(tmp_path):
# If the chunk is of size equal to the one in the Zarr encoding, but
# it is partially writing in the last chunk then raise an error
arr.isel(a=slice(8, None)).chunk(a=3).to_zarr(store, region="auto", mode="r+")


0 comments on commit 9302036

Please sign in to comment.