diff options
author | Jonathan Waltman <jonathan.waltman@gmail.com> | 2012-09-16 01:08:47 -0500 |
---|---|---|
committer | Jonathan Waltman <jonathan.waltman@gmail.com> | 2012-09-16 01:08:47 -0500 |
commit | bf362e9ccbf03988116d1c55209ae17ec8c17117 (patch) | |
tree | e1e78977c44edfb3e4e8e1f1513f019cf68556a0 /sphinx/ext/autodoc.py | |
parent | ead356e3cfa974e715ae4b9954b3ae5aee44b24c (diff) | |
download | sphinx-git-bf362e9ccbf03988116d1c55209ae17ec8c17117.tar.gz |
Closes #617: Fix docstring preparation without included signature: only ignore indentation of one line, not two.
Diffstat (limited to 'sphinx/ext/autodoc.py')
-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 9c6575f52..c15726b48 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 |