Skip to content

Make strict mypy and the test suite pass on every CI platform - #1

Merged
SMI-Lab-Inha merged 3 commits into
mainfrom
fix/typing-numpy-2.2
Oct 16, 2026
Merged

SMI-Lab-Inha merged 3 commits into
mainfrom
fix/typing-numpy-2.2

Conversation

@SMI-Lab-Inha

@SMI-Lab-Inha SMI-Lab-Inha commented Oct 16, 2026 •

Copy link
Copy Markdown
Owner

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 .dll library 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_tangent had 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.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-16T08:27:48.131836Z 378e0ed PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@read-the-docs-community

read-the-docs-community Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

@SMI-Lab-Inha SMI-Lab-Inha changed the title Make the type annotations pass strict mypy with NumPy 2.2 Make strict mypy and the test suite pass on every CI platform Oct 16, 2026
@SMI-Lab-Inha
SMI-Lab-Inha merged commit 16226c6 into main Oct 16, 2026
10 checks passed
@SMI-Lab-Inha
SMI-Lab-Inha deleted the fix/typing-numpy-2.2 branch October 16, 2026 10:03
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