Repository navigation
Conversation
mypy applies `strict` only when it is true, so `strict = false` in a per-module override is ignored. The 14 entries listed there (modules and globs) were already checked strictly. Remove the block, and reword the TODO on the `ignore_errors` list that pointed at it. Assisted-by: ClaudeCode:claude-opus-5-5
Narrow the subgroup returned by `AsyncGroup.getitem` to `AsyncGroup` before calling `group_keys`, which was the module's only mypy error, and remove `tests.test_store.test_fsspec` from the `ignore_errors` list so the module's own code is type-checked like the rest of the tests. Assisted-by: ClaudeCode:claude-opus-5-5
numcodecs main now warns that its Pickle codec is deprecated whenever one is created, and the suite turns warnings into errors, so the pickle decode-gate tests in test_v2.py fail in the upstream-dependencies job. Those tests create Pickle codecs on purpose, so ignore that warning for them. Released numcodecs doesn't warn, so the filter ignores the warning rather than requiring it. Assisted-by: ClaudeCode:claude-opus-5-5
`AsyncGroup.get_group` returns an `AsyncGroup` and raises if the member is an array, so the test needs no isinstance assert to type-check. Assisted-by: ClaudeCode:claude-opus-5-5
…opers#4680 Assisted-by: ClaudeCode:claude-opus-5-5
This branch has not been deployed
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 🤖
Removes the
[[tool.mypy.overrides]]block that setsstrict = falsefor 14 module entries, because mypy ignoresstrict = falsein a per-module override. Type checking is unchanged: those modules were already checked strictly, and they still pass.It also fixes the one mypy error in
tests/test_store/test_fsspec.pyand takes that module off theignore_errorslist.CI fix, unrelated to the change above: numcodecs main now warns that its
Picklecodec is deprecated, which fails the pickle decode-gate tests intests/test_v2.pyin thepy=3.15-upstreamjob. This affects every branch, not only this one. 711a47b adds a filter that ignores that warning for just those tests.Evidence
mypy/config_parser.py(2.4.1, the version pinned in pyproject.toml and uv.lock) handles the key like this:if key == "strict": if v: set_strict_flags(); continue. A false value is dropped without a warning. The same guard is in v1.0.0 and v1.15.0.strictcan't be scoped to a module in either direction:set_strict_flags(mypy/main.py:1470-1474) writes to the global options, sostrict = truein an override would turn strict mode on for the whole run.tests/test_metadata/test_v3.py,src/zarr/testing/stateful.py,tests/test_store/test_wrapper.pyandtests/package_with_entrypoint/__init__.py, all covered by the removed block. mypy flagged all four.strict = falsewith the explicit flags set to false cuts that to 20 errors. So the module patterns did match those files; the block just carried no flags.ignore_errorsand full strictness. Later PRs moved more modules into it, through 2025. The tier never took effect, so each module has been fully strict since it was moved in.tool.mypykeys, and the zarr-http-server mypy job uses its own package config.ignore_errorslist pointed at the removed tier. It now says to fix those modules' errors and take them off the list. All six entries there still have real errors.Adversarial review record
tests.test_store.test_fsspechas one remaining mypy error (union-attrat line 492), so it could leave theignore_errorslist. mypy also accepts per-modulestrictwithout a warning, so a check that rejectsstrictinside overrides would stop this from coming back. Neither is done here.strict = truecould fix the block. Fixed above:strictsets global options, so it can't be scoped to a module.[tool.mypy]said nothing. Removed.Assisted-bytrailer spells the model ID with hyphens. Kept, because that is the model's ID.test_fsspeccommit (one round by a fresh reviewer, given only that commit and the files it touches): nothing serious.union-attrat line 492), and theisinstancenarrowing clears it.from zarr import AsyncGroupis the class thatgetitemreturns. The test still fails ifgetitemreturns an array, now with a clearer assertion error.AsyncGroup.get_group, which returns anAsyncGroupand raisesContainsArrayErrorfor an array, instead of narrowinggetitem's result with anisinstanceassert.get_groupgoes throughgetiteminternally, so the test exercises the same lookup.Any, because ofpytest.importorskipand missingpy.typed. So strict checking covers the module's own code and its zarr calls, not those libraries' calls. Fixed by rewording the commit message to say so. CI's mypy run uses the same locked environment as local runs.🤖 Generated with Claude Code