pythonintellij-ideapycharmdocstring

What style does PyCharm / IntelliJ use for Python docstrings?


I'm trying to understand the "solution ecosystem" with respect to creating docstrings, and then generating some nice reference documentation with PyCharm/IntelliJ.

I'm used to the Google style docstrings, and am confused by PyCharm's default docstring skeleton format/style however:

"""
:param <paramname>: blah blah
:return None
"""

What style is this and what reference doc generators does it work with? Is there a style guide somewhere?


Solution

  • Those are the Sphinx style doc strings.

    Python has some strong opinions about doc strings, see PEP257.

    Here is a full description of all of the doc string types in Python: What is the standard Python docstring format?