summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakeshi KOMIYA <i.tkomiya@gmail.com>2018-01-02 01:57:41 +0900
committerTakeshi KOMIYA <i.tkomiya@gmail.com>2018-01-02 01:57:41 +0900
commitcb860f0d306b3dc5a8688e3c88035b060fc0882f (patch)
tree7c8f3cd4cd6b11f1bdaca26e8fb5db04657f3cbd
parent4bc4b35352ea8ce266ebf6ccf433d3d45758cfe9 (diff)
downloadsphinx-git-cb860f0d306b3dc5a8688e3c88035b060fc0882f.tar.gz
Fix #4091: Private members not documented without :undoc-members:
-rw-r--r--CHANGES1
-rw-r--r--sphinx/ext/autodoc.py3
2 files changed, 2 insertions, 2 deletions
diff --git a/CHANGES b/CHANGES
index 39288bea7..1e1379178 100644
--- a/CHANGES
+++ b/CHANGES
@@ -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
--------
diff --git a/sphinx/ext/autodoc.py b/sphinx/ext/autodoc.py
index e04b4a09d..bd686644c 100644
--- a/sphinx/ext/autodoc.py
+++ b/sphinx/ext/autodoc.py
@@ -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