FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

DOC: Ensure that we add documentation also as to the dict for types by charris · Pull Request #20082 · numpy/numpy · GitHub

/ numpy Public

DOC: Ensure that we add documentation also as to the dict for types - #20082

Merged
charris merged 2 commits into
numpy:maintenance/1.21.xfrom
charris:backport-18775
Oct 10, 2021
Merged

charris merged 2 commits into
numpy:maintenance/1.21.xfrom
charris:backport-18775

Conversation

charris commented Oct 10, 2021

Copy link
Copy Markdown
Member

Backport of #19775.

This ensures that help(np.dtype) produces a result. I am not
exactly sure why it picks up __doc__ from the dict instead of
tp_doc right now. It probably is due to the combination of
inheritance and the fact that the dict always includes None
and gets preference during inheritance.
(That probably makes a lot of sense to not inherit the type
docstring by default.)

Modifying the dictionary directly is not really good style, either,
but hopefully works.

Closes gh-18740

seberg and others added 2 commits October 9, 2021 20:33
This ensures that `help(np.dtype)` produces a result.  I am not
exactly sure why it picks up `__doc__` from the dict instead of
`tp_doc` right now. It probably is due to the combination of
inheritance and the fact that the dict always includes `None`
and gets preference during inheritance.
(That probably makes a lot of sense to not inherit the `type`
docstring by default.)

Modifying the dictionary directly is not really good style, either,
but hopefully works.

Closes numpygh-18740
Co-authored-by: Warren Weckesser <warren.weckesser@gmail.com>
charris added 04 - Documentation 08 - Backport Used to tag backport PRs labels Oct 10, 2021
charris added this to the 1.21.3 release milestone Oct 10, 2021
charris merged commit 707f650 into numpy:maintenance/1.21.x Oct 10, 2021
charris deleted the backport-18775 branch October 10, 2021 03:53
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

04 - Documentation 08 - Backport Used to tag backport PRs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants


Back | FazBrowse Home | New Git URL