diff --git a/xarray/backends/zarr.py b/xarray/backends/zarr.py index e6fe93a398a..775bd1e6d80 100644 --- a/xarray/backends/zarr.py +++ b/xarray/backends/zarr.py @@ -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 @@ -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 @@ -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: diff --git a/xarray/tests/test_backends.py b/xarray/tests/test_backends.py index c04f71ae61c..6529dd74c21 100644 --- a/xarray/tests/test_backends.py +++ b/xarray/tests/test_backends.py @@ -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+") - -