conner.xyz
conner.xyz

Reputation: 7275

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?

Upvotes: 3

Views: 3933

Answers (2)

Roskoe Willemin
Roskoe Willemin

Reputation: 1

Found this in townie's link:
https://www.sphinx-doc.org/en/master/usage/restructuredtext/basics.html

I'm pretty sure restructured text is the default in PyCharm 2024.2

Upvotes: 0

townie
townie

Reputation: 322

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?

Upvotes: 6

Related Questions