Skip to content

Conversation

@max-sixty
Copy link
Collaborator

Summary

Fixes mypy type checking errors that appeared with updated type stubs:

  • Add type: ignore[override] to CFTimeIndex.__add__ and __radd__ methods which have simpler signatures than pandas Index supertype's complex overloaded signatures
  • Add type: ignore[call-arg] to dtype_out.type(fill_value) call in dtypes.py - valid numpy code but incorrectly flagged by mypy stubs
  • Remove unused type: ignore[operator] comment in test_plot.py that is no longer needed

Test plan

  • dmypy run passes with no errors
  • pre-commit run --all-files passes
  • All cftimeindex tests pass (1017 tests)
  • All dtypes tests pass (60 tests)
  • Related plot tests pass

🤖 Generated with Claude Code

Add type ignore comments for three mypy errors that appeared with updated type stubs:
- CFTimeIndex.__add__ and __radd__ have simpler signatures than pandas Index
- numpy dtype_out.type() call is valid but flagged by mypy stubs
- Remove unused type ignore comment in test_plot.py

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@github-actions github-actions bot added topic-cftime topic-NamedArray Lightweight version of Variable labels Oct 28, 2025
CI uses different pandas/numpy type stubs than local environment.
Only keep the type: ignore[operator] for test_plot.py that CI needs.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@max-sixty
Copy link
Collaborator Author

ok, possibly #10878 just needed updating

@max-sixty max-sixty closed this Oct 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

topic-cftime topic-NamedArray Lightweight version of Variable

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant