Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 859
conner.xyz Avatar asked Sep 20 '25 12:09

conner.xyz


1 Answers

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?

like image 84
townie Avatar answered Sep 23 '25 03:09

townie