Conversation
This was referenced Sep 26, 2026
Documentation build overview
|
…t is Five validators cast a document to `Mapping[str, object]` before any key was checked, then cast it again to `Mapping[object, object]` to check the keys. It is `Mapping[object, object]` until its keys are read, and `_missing_keys`, `_check_literal` and `_validate_dim_sequence` take it so, which removes the second casts. Assisted-by: ClaudeCode:claude-opus-5-5
d-v-b
force-pushed
the
refactor/zarr-metadata-unread-document-types
branch
from
September 26, 2026 18:41
726860b to
948d8fd
Compare
d-v-b
marked this pull request as ready for review
September 26, 2026 18:44
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.
🤖 AI text below 🤖
Five validators cast a document to
Mapping[str, object]before any key was checked, then cast it again toMapping[object, object]to check the keys. It isMapping[object, object]until its keys are read, and_missing_keys,_check_literaland_validate_dim_sequencenow take it so, which removes 4 casts. No behaviour changes, so there is no changelog entry.This is one of eight independent PRs from a review of the casts in
zarr_metadata.model, each based onmainand each passingjust checkalone, with a test that fails without its fix where there is behaviour to test:They and #4422 all change
model/_validation.py, as #4420 and #4421 did before they merged, so each one merged after the first needs a rebase. Each is rebased onto both, so its tests are type-checked as #4421 now requires. All eight together, merged with #4421's type-checked tests, passjust check.🤖 Generated with Claude Code