Enable mypy checking for test_utils and test_parallelcompat#10691
Merged
Conversation
Removes xarray.tests.test_utils and xarray.tests.test_parallelcompat from the mypy exclusion list by fixing type issues in these files: - Added type annotations where needed - Added targeted type: ignore comments for intentional test behaviors - Fixed function call signatures to match expected types All tests continue to pass and mypy now checks these files with check_untyped_defs=true. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
Removes xarray.tests.test_missing from the mypy exclusion list by fixing type issues: - Added type: ignore comments for intentional test cases with invalid methods - Added type annotation for kwargs dict All 115 tests continue to pass. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
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.
Summary
xarray.tests.test_utilsandxarray.tests.test_parallelcompatfrom the mypy exclusion listcheck_untyped_defs=trueChanges
x: dict = {})# type: ignorecomments for intentional test behaviors (testing error conditions){}instead ofNonefor Mapping parameters)Test plan
uv run pytest xarray/tests/test_utils.py xarray/tests/test_parallelcompat.py)uv run mypy xarray/tests/test_utils.py xarray/tests/test_parallelcompat.py)🤖 Generated with Claude Code