summaryrefslogtreecommitdiff
path: root/sphinx/ext/autodoc.py
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2014-01-12 16:43:14 +0100
committerGeorg Brandl <georg@python.org>2014-01-12 16:43:14 +0100
commitaac72f175ab52779832961a88f6e8b8e94375d21 (patch)
tree6205df3f1ee269eb28474f5276f69f0f459377b6 /sphinx/ext/autodoc.py
parent3f1235e2ea3361c6b0bacf0e262c48699851aed3 (diff)
downloadsphinx-git-aac72f175ab52779832961a88f6e8b8e94375d21.tar.gz
Closes #1155: Fix autodocumenting C-defined methods as attributes in Python 3.
Diffstat (limited to 'sphinx/ext/autodoc.py')
-rw-r--r--sphinx/ext/autodoc.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/sphinx/ext/autodoc.py b/sphinx/ext/autodoc.py
index ad7b02bbb..9d950a754 100644
--- a/sphinx/ext/autodoc.py
+++ b/sphinx/ext/autodoc.py
@@ -1244,7 +1244,8 @@ class AttributeDocumenter(ClassLevelDocumenter):
def can_document_member(cls, member, membername, isattr, parent):
isdatadesc = isdescriptor(member) and not \
isinstance(member, cls.method_types) and not \
- type(member).__name__ in ("type", "method_descriptor")
+ type(member).__name__ in ("type", "method_descriptor",
+ "instancemethod")
return isdatadesc or (not isinstance(parent, ModuleDocumenter)
and not inspect.isroutine(member)
and not isinstance(member, class_types))