Skip to content

Commit e7a4505

Browse files
committed
Clarify comment style for module data members and class attributes
1 parent 9a899dc commit e7a4505

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

docs/doc_conventions.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,12 @@ have chosen to not use code as the source of instance attribute documentation.
153153
Instead, it is added manually to the documentation files in ``cmd2/docs/api``.
154154
See ``cmd2/docs/api/cmd.rst`` to see how to add documentation for an attribute.
155155

156+
For module data members and class attributes, the ``autodoc`` extension allows
157+
documentation in a comment with special formatting (using a #: to start the
158+
comment instead of just #), or in a docstring after the definition. This project
159+
has standardized on the docstring after the definition approach. Do not use the
160+
specially formatted comment approach.
161+
156162

157163
Links to API Reference
158164
----------------------

0 commit comments

Comments
 (0)