Skip to content

Commit

Permalink
Fix mode="w-" test
Browse files Browse the repository at this point in the history
  • Loading branch information
dcherian committed Jan 3, 2024
1 parent c4f75e9 commit 6dd0d78
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion xarray/backends/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -1958,7 +1958,13 @@ def initialize_zarr(
mode=mode,
storage_options=kwargs.get("storage_options", None),
)
# TODO: Handle mode="w-", this isn't raising an error yet.
if mode == "w-":
zarr.open_group(
store,
mode=mode,
storage_options=kwargs.get("storage_options", None),
path=kwargs.get("group", None),
)

if TYPE_CHECKING:
assert isinstance(store, MutableMapping)
Expand Down

0 comments on commit 6dd0d78

Please sign in to comment.