I'm documenting my Python project with Sphinx, and want to document class attributes inside the class docstring block. Attribute inline docstrings are ugly.
I did try adding attribute docstring to class docstring block but when Sphinx makes html, it does not show properly.
class MyClass():
"""
MyClass docstring block.
Attributes:
name - A single attribute.
:attr name - A single attribute.
"""
name = "ABC"
The generated html displays a simple line. Instead with attribute inline docstring display a nice style.