summaryrefslogtreecommitdiff
path: root/sphinx/ext/autodoc.py
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2012-10-28 18:01:57 +0100
committerGeorg Brandl <georg@python.org>2012-10-28 18:01:57 +0100
commit33828e4777a8b5112651219ffc96609cc775b48e (patch)
treee043f82e1c3aa26f5283bd582b7176a5d3b77460 /sphinx/ext/autodoc.py
parentfc7edd8f71d00fc317d3231af25d1af1c2cd7b7a (diff)
parentad6318e7f16e61ae694a5ffa87b1c7f4497c3698 (diff)
downloadsphinx-git-33828e4777a8b5112651219ffc96609cc775b48e.tar.gz
merge with stable
Diffstat (limited to 'sphinx/ext/autodoc.py')
-rw-r--r--sphinx/ext/autodoc.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/sphinx/ext/autodoc.py b/sphinx/ext/autodoc.py
index 6c796eec0..b0657dc9e 100644
--- a/sphinx/ext/autodoc.py
+++ b/sphinx/ext/autodoc.py
@@ -866,7 +866,7 @@ class DocstringSignatureMixin(object):
"""
def _find_signature(self, encoding=None):
- docstrings = Documenter.get_doc(self, encoding, 2)
+ docstrings = Documenter.get_doc(self, encoding)
if len(docstrings) != 1:
return
doclines = docstrings[0]
@@ -881,6 +881,9 @@ class DocstringSignatureMixin(object):
# the base name must match ours
if not self.objpath or base != self.objpath[-1]:
return
+ # re-prepare docstring to ignore indentation after signature
+ docstrings = Documenter.get_doc(self, encoding, 2)
+ doclines = docstrings[0]
# ok, now jump over remaining empty lines and set the remaining
# lines as the new doclines
i = 1