3 ms·
There are a few styles of docstrings that Sphinx can parse and include in docs with e.g. sphinx-autodoc: `:param, :type, :returns, :rtype` docstrings (which OP
by westurner 6y ago
There are a few styles of docstrings that Sphinx can parse and include in docs with e.g. sphinx-autodoc:
`:param, :type, :returns, :rtype` docstrings (which OP uses; and which pycontracts can read runtime parameter and return type contracts from https://andreacensi.github.io/contracts/ https://andreacensi.github.io/contracts/ (though Python 3 annotations are now the preferred style for compile or editing-time typechecks))
Numpydoc docstrings: https://numpydoc.readthedocs.io/en/latest/format.html https://numpydoc.readthedocs.io/en/latest/format.html
Googledoc docstrings:
https://sphinxcontrib-napoleon.readthedocs.io/en/latest/ https://sphinxcontrib-napoleon.readthedocs.io/en/latest/