diff options
author | Georg Brandl <georg@python.org> | 2010-04-04 18:52:29 +0200 |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2010-04-04 18:52:29 +0200 |
commit | f12991c93e450178787ddcbc53f70e2bf4e154fa (patch) | |
tree | f88988dfe55c871ea786bc72f09a2169226cfda2 /sphinx/ext/autodoc.py | |
parent | e8fe8584e468d9eee33b9d640bae27b6a8b0e605 (diff) | |
download | sphinx-git-f12991c93e450178787ddcbc53f70e2bf4e154fa.tar.gz |
#362: In autodoc, check for the existence of ``__self__`` on function objects before accessing it.
Diffstat (limited to 'sphinx/ext/autodoc.py')
-rw-r--r-- | sphinx/ext/autodoc.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sphinx/ext/autodoc.py b/sphinx/ext/autodoc.py index 9f91154fb..676740671 100644 --- a/sphinx/ext/autodoc.py +++ b/sphinx/ext/autodoc.py @@ -982,6 +982,7 @@ class MethodDocumenter(ClassLevelDocumenter): self.member_order = self.member_order - 1 elif isinstance(self.object, FunctionType) or \ (isinstance(self.object, BuiltinFunctionType) and + hasattr(self.object, '__self__') and self.object.__self__ is not None): self.directivetype = 'staticmethod' # document class and static members before ordinary ones |