summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarlon James <47790688+garmin-mjames@users.noreply.github.com>2020-09-18 12:16:07 -0700
committerTakeshi KOMIYA <i.tkomiya@gmail.com>2020-11-15 14:19:33 +0900
commit6082ce67a4800b796cb0d267725679f7f4ca9f48 (patch)
treec21dbcda25b4925fc8ee9cf225bc6d6215355f86
parent04b374a8a75905d0507744cca1b221d17d87829e (diff)
downloadsphinx-git-6082ce67a4800b796cb0d267725679f7f4ca9f48.tar.gz
autodoc: document :novalue: option
-rw-r--r--doc/usage/extensions/autodoc.rst12
1 files changed, 12 insertions, 0 deletions
diff --git a/doc/usage/extensions/autodoc.rst b/doc/usage/extensions/autodoc.rst
index 2d8a216c0..1e7bad8df 100644
--- a/doc/usage/extensions/autodoc.rst
+++ b/doc/usage/extensions/autodoc.rst
@@ -326,6 +326,15 @@ inserting them into the page source under a suitable :rst:dir:`py:module`,
By default, without ``annotation`` option, Sphinx tries to obtain the value of
the variable and print it after the name.
+ The ``novalue`` option can be used instead of a blank ``annotation`` to show the
+ type hint but not the value::
+
+ .. autodata:: CD_DRIVE
+ :novalue:
+
+ If both the ``annotation`` and ``novalue`` options are used, ``novalue`` has no
+ effect.
+
For module data members and class attributes, documentation can either be put
into a comment with special formatting (using a ``#:`` to start the comment
instead of just ``#``), or in a docstring *after* the definition. Comments
@@ -365,6 +374,9 @@ inserting them into the page source under a suitable :rst:dir:`py:module`,
option.
.. versionchanged:: 2.0
:rst:dir:`autodecorator` added.
+ .. versionchanged:: 3.3
+ :rst:dir:`autodata` and :rst:dir:`autoattribute` now have a ``novalue``
+ option.
.. note::