Skip to content

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

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

BUG: Fixed an issue where .pyi files were ignored by numpy sub-packages#17701
charris merged 2 commits intonumpy:masterfrom
BvB93:pyi

Conversation

@BvB93
Copy link
Member

@BvB93 BvB93 commented Nov 3, 2020

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
Copy link
Member

charris commented Nov 3, 2020

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
Copy link
Member Author

BvB93 commented Nov 3, 2020

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
Copy link
Member

charris commented Nov 3, 2020

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