summaryrefslogtreecommitdiff
path: root/sphinx/ext/autodoc.py
diff options
context:
space:
mode:
authorBogdan Opanchuk <bogdan@opanchuk.net>2013-04-20 21:58:18 +1000
committerBogdan Opanchuk <bogdan@opanchuk.net>2013-04-20 21:58:18 +1000
commita7a4f7569a3361be5a3aabeea478a7f46d689727 (patch)
treecd043276da777b356dc247f2350591c696839d4f /sphinx/ext/autodoc.py
parent4ce1cbc0108a170174ae3a5071775261916aac93 (diff)
downloadsphinx-git-a7a4f7569a3361be5a3aabeea478a7f46d689727.tar.gz
Added ``imported-members`` option for ``automodule`` directive in autodoc
Diffstat (limited to 'sphinx/ext/autodoc.py')
-rw-r--r--sphinx/ext/autodoc.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/sphinx/ext/autodoc.py b/sphinx/ext/autodoc.py
index 555a31066..432b9ec29 100644
--- a/sphinx/ext/autodoc.py
+++ b/sphinx/ext/autodoc.py
@@ -364,6 +364,9 @@ class Documenter(object):
"""Check if *self.object* is really defined in the module given by
*self.modname*.
"""
+ if self.options.imported_members:
+ return True
+
modname = self.get_attr(self.object, '__module__', None)
if modname and modname != self.modname:
return False
@@ -770,6 +773,7 @@ class ModuleDocumenter(Documenter):
'platform': identity, 'deprecated': bool_option,
'member-order': identity, 'exclude-members': members_set_option,
'private-members': bool_option, 'special-members': members_option,
+ 'imported-members': bool_option,
}
@classmethod