Repository navigation
Make strict mypy and the test suite pass on every CI platform - #1
Merged
Merged
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Documentation build overview
18 files changed ·
|
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.
The CI type check runs on Python 3.10, where pip resolves NumPy 2.2. Its type stubs describe array shapes differently from NumPy 2.4, and strict mypy reported 25 errors. The annotations are now explicit, so strict mypy passes with NumPy 2.2 and 2.4 alike. The matplotlib rc dictionaries are also cast, because matplotlib 3.11 types their keys as literals. These changes affect annotations only.
One controller-library test named a
.dlllibrary and so passed only on Windows. It now sets the host library suffix, as the other controller-library tests do.Strict mypy passes on Python 3.10 with NumPy 2.2.6 and on Python 3.11 with NumPy 2.4.6. The full test suite passes on both, and the run tests also pass with a Linux and a macOS host suffix.
On macOS the tangent returned by
azimuth_tangenthad an azimuth component of 0.9999999999999999, because complex division does not round z / z to exactly one on every platform. The component is now set to exactly one, which is the documented normalisation.