summaryrefslogtreecommitdiff
path: root/sphinx/ext/autodoc.py
diff options
context:
space:
mode:
Diffstat (limited to 'sphinx/ext/autodoc.py')
-rw-r--r--sphinx/ext/autodoc.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/sphinx/ext/autodoc.py b/sphinx/ext/autodoc.py
index c15726b48..b0657dc9e 100644
--- a/sphinx/ext/autodoc.py
+++ b/sphinx/ext/autodoc.py
@@ -573,7 +573,11 @@ class Documenter(object):
if want_all and membername.startswith('__') and \
membername.endswith('__') and len(membername) > 4:
# special __methods__
- if self.options.special_members and membername != '__doc__':
+ if self.options.special_members is ALL and \
+ membername != '__doc__':
+ keep = has_doc or self.options.undoc_members
+ elif self.options.special_members and \
+ membername in self.options.special_members:
keep = has_doc or self.options.undoc_members
elif want_all and membername.startswith('_'):
# ignore members whose name starts with _ by default
@@ -748,7 +752,7 @@ class ModuleDocumenter(Documenter):
'show-inheritance': bool_option, 'synopsis': identity,
'platform': identity, 'deprecated': bool_option,
'member-order': identity, 'exclude-members': members_set_option,
- 'private-members': bool_option, 'special-members': bool_option,
+ 'private-members': bool_option, 'special-members': members_option,
}
@classmethod
@@ -952,7 +956,7 @@ class ClassDocumenter(ModuleLevelDocumenter):
'noindex': bool_option, 'inherited-members': bool_option,
'show-inheritance': bool_option, 'member-order': identity,
'exclude-members': members_set_option,
- 'private-members': bool_option, 'special-members': bool_option,
+ 'private-members': bool_option, 'special-members': members_option,
}
@classmethod