Closed guillochon closed 5 years ago
You may already be aware but Sphinx can support Numpy or Google Style Docstrings with the Napoleon extension. https://github.com/sphinx-contrib/napoleon
I believe you can pip install it, add the extension to your conf.py
and it will just work without extra configuration.
I am aware, unfortunately my company insists upon this particular docstring format.
My condolences 😉
I know this isn't what you wanted, but you might give pyment
a try. It's a python based command line tool you can use to generate docstrings in different formats.
https://github.com/dadadel/pyment/blob/master/doc/sphinx/source/pyment.rst
If you are willing to ditch Atom, there is also the autoDocstring
VScode plugin.
Both of these tools support the Sphinx/reST style.
pyment
looks like a nice option, thanks!
And yes I saw that VScode has a plugin to do the format I want (and so does pycharm
), but I'm resisting the urge to switch over...
I will add the new style, so need to change to VScode.
@guillochon I don't use that specific style, so let me know if I need to fix or add something.
@spadarian I have one requested thing to add: A checkbox option to separate param description and type, like so:
:param variable This variable describes this.
:type variable string
This is immensely helpful already though!
As described here: http://www.sphinx-doc.org/en/master/usage/restructuredtext/domains.html#info-field-lists