Debian Codegraph @

docs/source/docformat/google-numpy.rst

raw
1 Google and Numpy
2 ================
3
4 .. toctree::
5 :maxdepth: 1
6
7 google_demo/index
8 numpy_demo/index
9
10 Pydoctor now supports numpydoc and google style docstrings!
11
12 Docstrings will be first converted to reStructuredText and then parsed with ``docutils``.
13 Any supported `reST markup <restructuredtext.html>`_ can be use to supplement google-style or numpy-style markup.
14
15 The main difference between the two styles is that Google uses indentation to separate sections,
16 whereas NumPy uses underlines. This means that 2 blank lines are needed to end a NumPy section
17 that is followed by a regular paragraph (i.e. not another section header)
18
19 .. note:: We have forked and enhanced the `napoleon Sphinx extension
20 <https://www.sphinx-doc.org/en/master/usage/extensions/napoleon.html>`_.
21
22 For more information, refer to :py:mod:`pydoctor.napoleon` documentation.
23
24 For complete markup details, refer to the `Google style <https://google.github.io/styleguide/pyguide.html#38-comments-and-docstrings>`_
25 or `NumpyDoc style <https://numpydoc.readthedocs.io/en/latest/format.html>`_ reference documentation.
26
27
28 Sections
29 --------
30
31 List of supported sections:
32 - ``Args``, ``Arguments``, ``Parameters``
33 - ``Keyword Args``, ``Keyword Arguments``
34 - ``Return(s)``, ``Yield(s)``
35 (if you use type annotations a ``Returns`` section will always be present)
36 - ``Raise(s)``, ``Warn(s)``
37 - ``See Also``, ``See``
38 - ``Example(s)``
39 - ``Note(s)``, ``Warning(s)`` and other admonitions
40 - ``Attributes`` (Items will be translated into ``ivar`` fields.)
41
42 Sections supported on a "best effort" basis:
43 - ``Methods``: Items will be included into a generic "Methods" section.
44 - ``References``: Rendered as a generic section.
45 - ``Other Parameters``, ``Receive(s)``: Parameters described in those sections will be merged with regular parameters.
46
47 .. ReST syntax violations might be reported with a slightly incorrect
48 line number because of this pre-processing. (uncommented this when pydoctor/issues/237 is solved)