Close #8022: autodoc: Allow to hide the value of the variables via metadata

autodata and autoattribute directives does not show right-hand value of
the variable if its docstring contains ``:meta hide-value:`` in
info-field-list.
This commit is contained in:
Takeshi KOMIYA
2020-12-25 14:28:28 +09:00
parent bcebe71c8e
commit 9e9e486e65
7 changed files with 153 additions and 0 deletions

View File

@@ -182,6 +182,16 @@ inserting them into the page source under a suitable :rst:dir:`py:module`,
.. versionadded:: 3.1
* autodoc considers a variable member does not have any default value if its
docstring contains ``:meta hide-value:`` in its :ref:`info-field-lists`.
Example:
.. code-block:: rst
var1 = None #: :meta hide-value:
.. versionadded:: 3.5
* Python "special" members (that is, those named like ``__special__``) will
be included if the ``special-members`` flag option is given::