You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix type errors after removing mypy exclusions for test files (#10762)
* Reduce mypy exclusion list for test files
Removes several test modules from the `check_untyped_defs = false` override in `pyproject.toml`. This allows mypy to check these modules for untyped definitions, improving type coverage.
Also fixes a minor mypy error in `test_computation.py` and `test_coordinates.py` by changing `.get(variant)` to `[variant]` for dictionary access, and by changing `assert not coords.equals("not_a_coords")` to `assert not coords.equals(other_coords)`.
Co-authored-by: Claude <no-reply@anthropic.com>
* Fix type errors in test files with mypy exclusions removed
- Use Union types instead of type ignores where possible for better type safety
- Fix variable reassignment issues by using separate variable names
- Add minimal type ignores only where truly needed (testing invalid types, dynamic attributes)
- All tests pass and mypy checks succeed
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Use pipe syntax instead of Union for type annotations
Per review feedback from @Illviljan, replaced Union[...] with the
modern pipe syntax (type1 | type2 | ...) for better readability.
Co-authored-by: Claude <claude@anthropic.com>
* Add float to type union and use explicit types
While DsCompatible exists, it's too broad for mypy to handle well
in this test context. Using explicit types with float added per
review feedback.
Co-authored-by: Claude <claude@anthropic.com>
---------
Co-authored-by: Claude <no-reply@anthropic.com>
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Claude <claude@anthropic.com>
0 commit comments