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

Skip to content

MAINT: Warn if _add_newdocs.py is used to add docstrings to pure-python objects #13935

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
Jul 14, 2019

Conversation

eric-wieser
Copy link
Member

@eric-wieser eric-wieser commented Jul 8, 2019

Continuation of the maintenance part of #13876

@charris charris changed the title MAINT: Forbid the use of _add_newdocs.py to add docstrings to pure-python objects MAINT: Do no allow _add_newdocs.py to add docstrings to pure-python objects Jul 8, 2019
@eric-wieser
Copy link
Member Author

Will rebase this on gh-13946

@eric-wieser eric-wieser force-pushed the forbid-_add_newdocs-python-v2 branch from aa81973 to f1a974c Compare July 14, 2019 06:39
@eric-wieser
Copy link
Member Author

Rebased, pushed to the wrong branch by accident so this never updated

@eric-wieser eric-wieser changed the title MAINT: Do no allow _add_newdocs.py to add docstrings to pure-python objects MAINT: Warn if _add_newdocs.py is used to add docstrings to pure-python objects Jul 14, 2019


def _add_docstring(obj, doc, warn_on_python):
if warn_on_python and not _needs_add_docstring(obj):
Copy link
Member

Choose a reason for hiding this comment

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

The tests are complaining about the stack level of the warning.

…-python objects

This caught the duplication of docstrings between multiarray.py and _add_newdocs
@eric-wieser eric-wieser force-pushed the forbid-_add_newdocs-python-v2 branch from f1a974c to d14632c Compare July 14, 2019 18:32
@mattip mattip merged commit 4bbdcb8 into numpy:master Jul 14, 2019
@mattip
Copy link
Member

mattip commented Jul 14, 2019

Thanks @eric-wieser

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.

3 participants