Skip to content

Conversation

max-sixty
Copy link
Collaborator

Summary

  • Removes xarray.tests.test_utils and xarray.tests.test_parallelcompat from the mypy exclusion list
  • Fixes type issues in these test files to enable mypy checking with check_untyped_defs=true
  • Continues the gradual improvement of type checking coverage in the test suite

Changes

  • Added type annotations where needed (e.g., x: dict = {})
  • Added targeted # type: ignore comments for intentional test behaviors (testing error conditions)
  • Fixed function call signatures to match expected types (e.g., using {} instead of None for Mapping parameters)

Test plan

  • All tests in both files pass (uv run pytest xarray/tests/test_utils.py xarray/tests/test_parallelcompat.py)
  • mypy passes with these files removed from the exclusion list (uv run mypy xarray/tests/test_utils.py xarray/tests/test_parallelcompat.py)
  • No functional changes to the tests themselves

🤖 Generated with Claude Code

max-sixty and others added 2 commits September 3, 2025 15:09
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>
@max-sixty max-sixty merged commit 175734f into pydata:main Sep 3, 2025
37 checks passed
@max-sixty max-sixty deleted the fix-mypy-test-files branch September 3, 2025 22:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant