diff options
author | Georg Brandl <georg@python.org> | 2010-02-21 23:20:26 +0100 |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2010-02-21 23:20:26 +0100 |
commit | cee7e4ba3bcf34aab0c41f0172ade87952fefbf1 (patch) | |
tree | 4abf0a2814396cb786fbb3ca7e384c2e8147bbc4 /sphinx/ext/autodoc.py | |
parent | fab92b215afa61ffa17a12919a3bd5192adba754 (diff) | |
parent | 686824997dffd30b689f0abc5f3df8997149acc4 (diff) | |
download | sphinx-git-cee7e4ba3bcf34aab0c41f0172ade87952fefbf1.tar.gz |
merge with 0.6
Diffstat (limited to 'sphinx/ext/autodoc.py')
-rw-r--r-- | sphinx/ext/autodoc.py | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/sphinx/ext/autodoc.py b/sphinx/ext/autodoc.py index 81c3f6a44..1be4a7059 100644 --- a/sphinx/ext/autodoc.py +++ b/sphinx/ext/autodoc.py @@ -377,7 +377,12 @@ class Documenter(object): args = "(%s)" % self.args else: # try to introspect the signature - args = self.format_args() + try: + args = self.format_args() + except Exception, err: + self.directive.warn('error while formatting arguments for ' + '%s: %s' % (self.fullname, err)) + args = None retann = self.retann @@ -663,12 +668,7 @@ class Documenter(object): self.add_line(u'', '') # format the object's signature, if any - try: - sig = self.format_signature() - except Exception, err: - self.directive.warn('error while formatting signature for ' - '%s: %s' % (self.fullname, err)) - sig = '' + sig = self.format_signature() # generate the directive header and options, if applicable self.add_directive_header(sig) @@ -868,7 +868,6 @@ class ClassDocumenter(ModuleLevelDocumenter): return ret def format_args(self): - args = None # for classes, the relevant signature is the __init__ method's initmeth = self.get_attr(self.object, '__init__', None) # classes without __init__ method, default __init__ or |