summaryrefslogtreecommitdiff
path: root/sphinx/ext/autodoc.py
diff options
context:
space:
mode:
authorTakayuki Shimizukawa <shimizukawa@gmail.com>2014-06-09 22:45:05 +0900
committerTakayuki Shimizukawa <shimizukawa@gmail.com>2014-06-09 22:45:05 +0900
commit74fbd611ab0d6f509646369351c321a13bd0e038 (patch)
tree9a0e5df28ee17dbc92a3e989f01996d8c509895a /sphinx/ext/autodoc.py
parent52331a04c339d1f7e1f937628d5375334ca8f915 (diff)
parent1d742bdcf5181c0b8b4a3be310d28179d3d14819 (diff)
downloadsphinx-git-74fbd611ab0d6f509646369351c321a13bd0e038.tar.gz
merge with stable
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 ab0810976..280d1fd20 100644
--- a/sphinx/ext/autodoc.py
+++ b/sphinx/ext/autodoc.py
@@ -1216,6 +1216,8 @@ class MethodDocumenter(DocstringSignatureMixin, ClassLevelDocumenter):
if PY3:
def import_object(self):
ret = ClassLevelDocumenter.import_object(self)
+ if not ret:
+ return ret
obj_from_parent = self.parent.__dict__.get(self.object_name)
if isinstance(obj_from_parent, classmethod):
self.directivetype = 'classmethod'
@@ -1229,6 +1231,8 @@ class MethodDocumenter(DocstringSignatureMixin, ClassLevelDocumenter):
else:
def import_object(self):
ret = ClassLevelDocumenter.import_object(self)
+ if not ret:
+ return ret
if isinstance(self.object, classmethod) or \
(isinstance(self.object, MethodType) and
self.object.__self__ is not None):