Close #6830: autodoc: consider a member private if docstring has "private" metadata

This commit is contained in:
Takeshi KOMIYA
2020-01-01 14:40:13 +09:00
parent 0319faf8f1
commit b968bb91e9
11 changed files with 176 additions and 5 deletions

View File

@@ -140,6 +140,20 @@ inserting them into the page source under a suitable :rst:dir:`py:module`,
.. versionadded:: 1.1
* autodoc considers a member private if its docstring contains
``:meta private:`` in its :ref:`info-field-lists`.
For example:
.. code-block:: rst
def my_function(my_arg, my_other_arg):
"""blah blah blah
:meta private:
"""
.. versionadded:: 3.0
* Python "special" members (that is, those named like ``__special__``) will
be included if the ``special-members`` flag option is given::