sphinx-doc / sphinx-doc/sphinx
Napoleon: Enable numpydoc “Returns” section without type
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 8k
- Forks
- 2.6k
- PR merge metrics
- No merged PRs in 30d
Description
I use sphinx-autodoc-typehints, but can’t seem to find a way to write a Returns section in numpydoc style that doesn’t result in a :rtype: being inserted.
name
Desc
… results in “name” being treated as type
name: _
Desc
… results in “” being treated as type. Leaving out the “” just results in “name” being treated as type again.
Desc
… results in an empty description and “Desc” being used as return type.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the three numpydoc Returns examples from the issue with sphinx-autodoc-typehints. Trace how Napoleon parses the Returns section and how :rtype: is generated; the issue is done when a return description can be documented without an inserted type.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- documentation
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100