Skip to content

[stubtest] fix duplicate errors with invalid line numbers#20417

Merged
ilevkivskyi merged 2 commits into
python:masterfrom
jorenham:gh-15023
Jan 14, 2026
Merged

[stubtest] fix duplicate errors with invalid line numbers#20417
ilevkivskyi merged 2 commits into
python:masterfrom
jorenham:gh-15023

Conversation

@jorenham

Copy link
Copy Markdown
Contributor

Closes #15023

@jorenham

jorenham commented Dec 15, 2025

Copy link
Copy Markdown
Contributor Author

I verified that this works by running scipy-stubs==1.16.3.3 against scipy==1.17.0rc1, with a before/after of 714->536 reported stubtest errors.

@ilevkivskyi ilevkivskyi merged commit 2f86b1c into python:master Jan 14, 2026
16 checks passed
@jorenham jorenham deleted the gh-15023 branch January 14, 2026 09:00
michaelm-openai pushed a commit to michaelm-openai/mypy that referenced this pull request Jan 16, 2026
michaelm-openai pushed a commit to michaelm-openai/mypy that referenced this pull request Jan 16, 2026
@jessekrubin

Copy link
Copy Markdown

AHA! This is the commit that is causing me my-mypy woes!

@jorenham @ilevkivskyi I have pybind11 and pyo3 modules where a barrel/__init__.pyi reexports things so as to avoid having a bazillion line line single stub file. Mypy isn't able to import the faux stub modules because they dont exist. For reference, here is one of my public projects that has the aforementioned stub layout:

Pinning to 1.19.1 works for me, but anything after that is broken. Any recommendations? I would like to keep my broken up stubs.

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.

[stubtest] Type re-export creates duplicated error with invalid line number

3 participants