mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Make it clearer how autodoc special comments have to be formatted.
This commit is contained in:
@@ -194,12 +194,13 @@ inserting them into the page source under a suitable :rst:dir:`py:module`,
|
|||||||
automethod
|
automethod
|
||||||
autoattribute
|
autoattribute
|
||||||
|
|
||||||
These work exactly like :rst:dir:`autoclass` etc., but do not offer the options
|
These work exactly like :rst:dir:`autoclass` etc., but do not offer the
|
||||||
used for automatic member documentation.
|
options used for automatic member documentation.
|
||||||
|
|
||||||
For module data members and class attributes, documentation can either be put
|
For module data members and class attributes, documentation can either be put
|
||||||
into a special-formatted comment, or in a docstring *after* the definition.
|
into a comment with special formatting (using a ``#:`` to start the comment
|
||||||
Comments need to be either on a line of their own *before* the definition, or
|
instead of just ``#``), or in a docstring *after* the definition. Comments
|
||||||
|
need to be either on a line of their own *before* the definition, or
|
||||||
immediately after the assignment *on the same line*. The latter form is
|
immediately after the assignment *on the same line*. The latter form is
|
||||||
restricted to one line only.
|
restricted to one line only.
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user