summaryrefslogtreecommitdiff
path: root/sphinx/ext/autodoc.py
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2009-01-10 20:46:13 +0100
committerGeorg Brandl <georg@python.org>2009-01-10 20:46:13 +0100
commitd0e0acaaa1278627d70f7bbb7d823c79d3546b58 (patch)
tree6b277aae0685e0161a0f5f896fb599d5ffb1d27f /sphinx/ext/autodoc.py
parent4d345c8de394778b0e50ce4a13982f4a1173a378 (diff)
parentbeb141c1c79e5c7485f8ffef7eacf9212be3bcc3 (diff)
downloadsphinx-git-d0e0acaaa1278627d70f7bbb7d823c79d3546b58.tar.gz
merge in trunk
Diffstat (limited to 'sphinx/ext/autodoc.py')
-rw-r--r--sphinx/ext/autodoc.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/sphinx/ext/autodoc.py b/sphinx/ext/autodoc.py
index be3e3f0ff..d0512f2be 100644
--- a/sphinx/ext/autodoc.py
+++ b/sphinx/ext/autodoc.py
@@ -166,7 +166,7 @@ def between(marker, what=None, keepempty=False):
def isdescriptor(x):
"""Check if the object is some kind of descriptor."""
for item in '__get__', '__set__', '__delete__':
- if callable(getattr(x, item, None)):
+ if hasattr(getattr(x, item, None), '__call__'):
return True
return False
@@ -380,6 +380,8 @@ class RstGenerator(object):
# try to also get a source code analyzer for attribute docs
try:
analyzer = ModuleAnalyzer.for_module(mod)
+ # parse right now, to get PycodeErrors on parsing
+ analyzer.parse()
except PycodeError, err:
# no source file -- e.g. for builtin and C modules
analyzer = None