Fix #4091: Private members not documented without :undoc-members:

This commit is contained in:
Takeshi KOMIYA 2018-01-02 01:57:41 +09:00
parent 4bc4b35352
commit cb860f0d30
2 changed files with 2 additions and 2 deletions

View File

@ -39,6 +39,7 @@ Bugs fixed
``\chapter`` commands
* #4214: Two todolist directives break sphinx-1.6.5
* Fix links to external option docs with intersphinx (refs: #3769)
* #4091: Private members not documented without :undoc-members:
Testing
--------

View File

@ -965,8 +965,7 @@ class Documenter(object):
elif (namespace, membername) in attr_docs:
if want_all and membername.startswith('_'):
# ignore members whose name starts with _ by default
keep = self.options.private_members and \
(has_doc or self.options.undoc_members)
keep = self.options.private_members
else:
# keep documented attributes
keep = True