Merge pull request #4368 from tk0miya/4091_private_members_isnt_documented

Fix #4091: Private members not documented without :undoc-members:
This commit is contained in:
Takeshi KOMIYA
2018-01-03 09:43:29 +09:00
committed by GitHub
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