Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Appease mypy for arithmetic #510

Merged
merged 3 commits into from
Oct 14, 2023
Merged

Appease mypy for arithmetic #510

merged 3 commits into from
Oct 14, 2023

Conversation

mhostetter
Copy link
Owner

@mhostetter mhostetter added the typing Related to type hints label Sep 30, 2023
@codecov
Copy link

codecov bot commented Sep 30, 2023

Codecov Report

Attention: 8 lines in your changes are missing coverage. Please review.

Files Coverage Δ
src/galois/_domains/_array.py 93.98% <85.45%> (-2.92%) ⬇️

📢 Thoughts on this report? Let us know!.

If `Self + NDArray` is performed, this prevents `mypy` from falling back to `ndarray.__radd__()`, which has a return type of `NDArray`. This ensures that the arithmetic type is always `Self`. The runtime type checking will ensure valid arguments are passed.
@mhostetter mhostetter merged commit 7f8df89 into release/0.3.x Oct 14, 2023
43 checks passed
@mhostetter mhostetter deleted the mypy-arithmetic branch October 14, 2023 21:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
typing Related to type hints
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant