diff options
| author | Johannes Dewender <bitbucket@JonnyJD.net> | 2013-02-27 16:38:55 +0100 |
|---|---|---|
| committer | Johannes Dewender <bitbucket@JonnyJD.net> | 2013-02-27 16:38:55 +0100 |
| commit | 4188e198fed5eebadf5958bec81c6446ed64a958 (patch) | |
| tree | 38e6ee9d5e3be9018a4b5bf4e293a688a296b8df /doc/ext | |
| parent | 9eb441dfa22d3cb5b67c2cdd0d0e834f7beb5386 (diff) | |
| download | sphinx-4188e198fed5eebadf5958bec81c6446ed64a958.tar.gz | |
autodoc: change :novalue: to :annoation: option
The :novalue: option is now called :annotation: and has an additional feature:
When given with an argument, you can specify what the annotation
of the object will be.
Diffstat (limited to 'doc/ext')
| -rw-r--r-- | doc/ext/autodoc.rst | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/doc/ext/autodoc.rst b/doc/ext/autodoc.rst index 11fd3c8d..4f16723d 100644 --- a/doc/ext/autodoc.rst +++ b/doc/ext/autodoc.rst @@ -201,10 +201,19 @@ inserting them into the page source under a suitable :rst:dir:`py:module`, but do not offer the options used for automatic member documentation. :rst:dir:`autodata` and :rst:dir:`autoattribute` support - the ``novalue`` option. No value will be parsed from the code:: + the ``annotation`` option. + Without this option, the representation of the object + will be shown in the documentation. + When the option is given without arguments, + only the name of the object will be printed:: .. autodata:: CD_DRIVE - :novalue: + :annotation: + + You can tell sphinx what should be printed after the name:: + + .. autodata:: CD_DRIVE + :annotation: = your CD device name For module data members and class attributes, documentation can either be put into a comment with special formatting (using a ``#:`` to start the comment @@ -241,7 +250,8 @@ inserting them into the page source under a suitable :rst:dir:`py:module`, Comment docs are now allowed on the same line after an assignment. .. versionchanged:: 1.2 - :rst:dir:`autodata` and :rst:dir:`autoattribute` have a ``novalue`` option + :rst:dir:`autodata` and :rst:dir:`autoattribute` have + an ``annotation`` option .. note:: |
