Skip to content

BUG: Fixed an issue where .pyi files were ignored by numpy sub-packages - #17701

Merged
charris merged 2 commits into
numpy:masterfrom
BvB93:pyi
Nov 3, 2020
Merged

charris merged 2 commits into
numpy:masterfrom
BvB93:pyi

Conversation

@BvB93

@BvB93 BvB93 commented Nov 3, 2020

Copy link
Copy Markdown
Member

As of the moment .pyi stub files are only recognized for the main numpy namespace and the numpy.core sub-package,
despite the existence of stub files in other sub-packages such as numpy.lib and numpy.random.

This PR fixes aforementioned issue.

@charris

charris commented Nov 3, 2020

Copy link
Copy Markdown
Member

Out of curiosity, how is this all supposed to work? I had the impression that all the information would be available at the top level.

@BvB93

BvB93 commented Nov 3, 2020

Copy link
Copy Markdown
Member Author

Out of curiosity, how is this all supposed to work? I had the impression that all the information would be available at the top level.

This is mostly (though not exclusively) relevant for sub-module that do not export their content to the main numpy namespace (e.g. numpy.random). Stubs for the latter are currently not picked up as "*.pyi" is missing from the setups data_files entry.

@charris
charris merged commit 8b15e57 into numpy:master Nov 3, 2020
@charris

charris commented Nov 3, 2020

Copy link
Copy Markdown
Member

Thanks Bas.

@BvB93
BvB93 deleted the pyi branch November 3, 2020 16:43
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