Skip to content

Conversation

jorenham
Copy link
Member

@jorenham jorenham commented Sep 6, 2025

This partially addresses the incorrect way that we've been defining the methods of scalar types. Currently, this accidentally woirks in mypy, but there are good reasons for why it shouldn't. But as it currently stands, mypy can't address this, because that would cause problems for many libraries that use numpy.

Unless mypy_primer complains, then I'd like to backjport this, so that mypy doesn't have to wait ~5 months or so.

See python/mypy#15993 (comment) for context.

Note that the integer and floating scalar-type also have this issue. I'll address those in separate PR's (this weekend, hopefully).

@jorenham jorenham added the 09 - Backport-Candidate PRs tagged should be backported label Sep 6, 2025
@charris charris merged commit c8e2005 into numpy:main Sep 6, 2025
78 checks passed
@charris
Copy link
Member

charris commented Sep 6, 2025

Thanks Joren.

@charris charris removed the 09 - Backport-Candidate PRs tagged should be backported label Sep 6, 2025
@jorenham jorenham deleted the typing/inline-bool-methods branch September 6, 2025 22:10
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