Thanks to visit codestin.com
Credit goes to github.com

Skip to content

TYP: add __all__ in numpy._core.__init__ #29187

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 12, 2025
Merged

Conversation

jorenham
Copy link
Member

@jorenham jorenham commented Jun 12, 2025

Ported from numpy/numtype#156


Even though this is private API, my motivation for adding these exports is the same as in #29170:

They're available at runtime, so the stubs should reflect that (even though it's not public API), IMO.

It's also worth noting that this reduces the number of red squigglies in numpy/lib/*.py from 309 to 274 (checked with pyright numpy/lib/*.py after pip install pyright).

And since this stub is identical as the one in numtype's numpy-stubs, its correctness is indirectly verified by stubtest.

@jorenham jorenham added 41 - Static typing numtype Isssue/PR related to numpy/numtype labels Jun 12, 2025
@charris charris merged commit a811c05 into numpy:main Jun 12, 2025
77 checks passed
@charris
Copy link
Member

charris commented Jun 12, 2025

Thanks Joren.

@jorenham jorenham deleted the numtype/156 branch June 12, 2025 13:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
41 - Static typing numtype Isssue/PR related to numpy/numtype
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants