diff options
| author | Jon Waltman <jonathan.waltman@gmail.com> | 2012-09-16 01:08:47 -0500 |
|---|---|---|
| committer | Jon Waltman <jonathan.waltman@gmail.com> | 2012-09-16 01:08:47 -0500 |
| commit | bf3aa388d724bb36c0ce13cc13d15c475d80ddb0 (patch) | |
| tree | e1e78977c44edfb3e4e8e1f1513f019cf68556a0 /sphinx | |
| parent | 16fedf1ab62b2c1b18505f8317d348b13467ec1f (diff) | |
| download | sphinx-bf3aa388d724bb36c0ce13cc13d15c475d80ddb0.tar.gz | |
Closes #617: Fix docstring preparation without included signature: only ignore indentation of one line, not two.
Diffstat (limited to 'sphinx')
| -rw-r--r-- | sphinx/ext/autodoc.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sphinx/ext/autodoc.py b/sphinx/ext/autodoc.py index 9c6575f5..c15726b4 100644 --- a/sphinx/ext/autodoc.py +++ b/sphinx/ext/autodoc.py @@ -862,7 +862,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] @@ -877,6 +877,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 |
