Skip to content
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

ENH: Improve the placeholder annotations within sub-modules #18842

Merged
merged 9 commits into from
Apr 23, 2021

Conversation

BvB93
Copy link
Member

@BvB93 BvB93 commented Apr 23, 2021

Xref #18838.

This PR improves the current Any-based placeholder annotations within a number of modules,
replacing them with explicit functions, classes or objects when appropiate. While parameters of the
respective methods and functions remain unannotated (for now), these changes nevertheless provides
a notable improvement over a plain Any.

Part 1 in a series of 2 or 3 PRs.

@BvB93 BvB93 changed the title Placeholder main ENH: Improve the placeholder annotations within sub-modules Apr 23, 2021
Comment on lines +106 to +107
def _assert_valid_refcount(op): ...
def _gen_alignment_data(dtype=..., type=..., max_size=...): ...
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are currently two private (?) functions included within np.testing.__all__,
anyone know what's up with that?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They seem to have been there for a long time, they track back to 2009 and 2013 and are used outside the testing package. My guess is that it is an accident of naming. It would be interesting if pytest had something equivalent.

@charris charris merged commit af9e94c into numpy:main Apr 23, 2021
@charris
Copy link
Member

charris commented Apr 23, 2021

Thanks Bas.

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.

None yet

2 participants