Skip to content

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

Merged
charris merged 9 commits intonumpy:mainfrom
BvB93:placeholder_main
Apr 23, 2021
Merged

ENH: Improve the placeholder annotations within sub-modules#18842
charris merged 9 commits intonumpy:mainfrom
BvB93:placeholder_main

Conversation

@BvB93
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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.

2 participants