diff options
author | Dmitry Shachnev <mitya57@gmail.com> | 2014-01-20 18:32:47 +0400 |
---|---|---|
committer | Dmitry Shachnev <mitya57@gmail.com> | 2014-01-20 18:32:47 +0400 |
commit | c2eaf2af81c1c0bce89ce8e4e43d853ac768c8f3 (patch) | |
tree | bb18c53d431f98cb3a33df663efe9093af0775ea /sphinx/ext/autodoc.py | |
parent | 8115aa81a2972a5cc20b8d7c244c52e792ecad98 (diff) | |
parent | ce2185ce279664e54ba22b14663091abc5a3a8f2 (diff) | |
download | sphinx-git-c2eaf2af81c1c0bce89ce8e4e43d853ac768c8f3.tar.gz |
Merge
Diffstat (limited to 'sphinx/ext/autodoc.py')
-rw-r--r-- | sphinx/ext/autodoc.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sphinx/ext/autodoc.py b/sphinx/ext/autodoc.py index 86837ff8b..69c7753b4 100644 --- a/sphinx/ext/autodoc.py +++ b/sphinx/ext/autodoc.py @@ -443,7 +443,7 @@ class Documenter(object): # try to introspect the signature try: args = self.format_args() - except Exception, err: + except Exception as err: self.directive.warn('error while formatting arguments for ' '%s: %s' % (self.fullname, err)) args = None @@ -763,7 +763,7 @@ class Documenter(object): # parse right now, to get PycodeErrors on parsing (results will # be cached anyway) self.analyzer.find_attr_docs() - except PycodeError, err: + except PycodeError as err: self.env.app.debug('[autodoc] module analyzer failed: %s', err) # no source file -- e.g. for builtin and C modules self.analyzer = None @@ -1229,7 +1229,7 @@ class MethodDocumenter(DocstringSignatureMixin, ClassLevelDocumenter): ret = ClassLevelDocumenter.import_object(self) if isinstance(self.object, classmethod) or \ (isinstance(self.object, MethodType) and - self.object.im_self is not None): + self.object.__self__ is not None): self.directivetype = 'classmethod' # document class and static members before ordinary ones self.member_order = self.member_order - 1 @@ -1421,7 +1421,7 @@ class AutoDirective(Directive): try: self.genopt = Options(assemble_option_dict( self.options.items(), doc_class.option_spec)) - except (KeyError, ValueError, TypeError), err: + except (KeyError, ValueError, TypeError) as err: # an option is either unknown or has a wrong type msg = self.reporter.error('An option to %s is either unknown or ' 'has an invalid value: %s' % (self.name, err), |