Skip to content

TYP: _NestedSequence type parameter default to work around a mypy issue#31399

Merged
charris merged 1 commit into
numpy:mainfrom
jorenham:typing/_NestedSequence/mypy-workaround
May 8, 2026
Merged

TYP: _NestedSequence type parameter default to work around a mypy issue#31399
charris merged 1 commit into
numpy:mainfrom
jorenham:typing/_NestedSequence/mypy-workaround

Conversation

@jorenham

@jorenham jorenham commented May 8, 2026

Copy link
Copy Markdown
Member

PR summary

This works around false positive var-annotated mypy errors in certain situations, that's currently blocking a fix for the typeshed stdlib stubs.

x-ref: python/typeshed#15472 (comment)

AI Disclosure

N/A

@jorenham jorenham added 09 - Backport-Candidate PRs tagged should be backported 41 - Static typing labels May 8, 2026
@jorenham

jorenham commented May 8, 2026

Copy link
Copy Markdown
Member Author

cc @randolf-scholz

@jorenham

jorenham commented May 8, 2026

Copy link
Copy Markdown
Member Author

Test failures seem unrelated (probably related to the python 3.15.0b0 release)

@charris charris merged commit 7acf88c into numpy:main May 8, 2026
106 of 118 checks passed
@charris

charris commented May 8, 2026

Copy link
Copy Markdown
Member

Thanks Joren.

@jorenham jorenham deleted the typing/_NestedSequence/mypy-workaround branch May 8, 2026 15:31
@charris charris removed the 09 - Backport-Candidate PRs tagged should be backported label May 8, 2026
charris pushed a commit to charris/numpy that referenced this pull request May 8, 2026
charris added a commit that referenced this pull request May 8, 2026
TYP: `_NestedSequence` type parameter default to work around a mypy issue (#31399)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants