CI: Run ty on NumPy's type stubs#31956
Open
jelle-openai wants to merge 2 commits into
Open
Conversation
Add a Python 3.14 ty job covering the production stubs and pin ty alongside the other typing tools. Keep invalid-type-form enabled so shadowed dtype annotations are caught, while disabling runtime-incompatible override checks and narrowly suppressing the remaining intentional typing helpers.
jorenham
reviewed
Jul 10, 2026
Address review feedback by relying on NumPy's minimum supported Python version, simplifying stub discovery, and disabling subclass-of-final-class globally instead of repeating inline suppressions.
Member
|
This is probably worth discussing a bit before merging, so I've added the "triage review" label. Would you be willing to come to a NumPy community meeting or triage meeting to @jelle-openai? See https://scientific-python.org/calendars/ for the data. |
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.
PR summary
Add a Python 3.14 ty job covering the production stubs and pin ty alongside the other typing tools. To get ty to pass, I disabled the
invalid-method-overriderule (it had >200 hits I think, not really fixable) and mostly# ty: ignored the rest. Most issues found by ty were the same as ones already flagged by mypy and pyright. There are also a lot ofsubclass-of-final-class; perhaps it makes sense to disable that rule globally too?AI Disclosure
The PR was fully written by Codex.