Google and Numpy
Pydoctor now supports numpydoc and google style docstrings!
Docstrings will be first converted to reStructuredText and then parsed with docutils
.
Any supported reST markup can be use to supplement google-style or numpy-style markup.
The main difference between the two styles is that Google uses indentation to separate sections, whereas NumPy uses underlines. This means that 2 blank lines are needed to end a NumPy section that is followed by a regular paragraph (i.e. not another section header)
Note
We have forked and enhanced the napoleon Sphinx extension.
For more information, refer to pydoctor.napoleon
documentation.
For complete markup details, refer to the Google style or NumpyDoc style reference documentation.
Sections
- List of supported sections:
Args
,Arguments
,Parameters
Keyword Args
,Keyword Arguments
Return(s)
,Yield(s)
(if you use type annotations aReturns
section will always be present)Raise(s)
,Warn(s)
See Also
,See
Example(s)
Note(s)
,Warning(s)
and other admonitionsAttributes
(Items will be translated intoivar
fields.)
- Sections supported on a “best effort” basis:
Methods
: Items will be included into a generic “Methods” section.References
: Rendered as a generic section.Other Parameters
,Receive(s)
: Parameters described in those sections will be merged with regular parameters.