Fix mypy failure: drop dead zarr<3 branch in invalid-store test - #11366
Merged
Conversation
<details><summary>Claude's draft</summary>
`test_raises_key_error_on_invalid_zarr_store` branched on
`zarr.__version__ < 3.0.0` and called `Group.create_dataset`, which no
longer exists in zarr 3. Since xarray's minimum supported zarr is now 3.0,
that branch is dead code and mypy fails with:
"Group" has no attribute "create_dataset" [attr-defined]
Drop the version guard and always use `Group.create_array`.
Co-authored-by: Claude <noreply@anthropic.com>
Resume this Claude session:
```
claude --resume 9faa34e9-aaf5-4e94-a2b7-b03f468175f8
```
</details>
4 tasks
d-v-b
approved these changes
May 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Seems like min value for zarr is 3.0 at runtime
xarray/pyproject.toml
Line 43 in f70bc9c
Claude's draft
test_raises_key_error_on_invalid_zarr_storebranched onzarr.__version__ < 3.0.0and calledGroup.create_dataset, which no longer exists in zarr 3. Since xarray's minimum supported zarr is now 3.0, that branch is dead code and mypy fails with:Drop the version guard and always use
Group.create_array.Co-authored-by: Claude noreply@anthropic.com
Resume this Claude session:
Description
Checklist
whats-new.rstapi.rstAI Disclosure
Tools: Claude