We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 54eb504 commit c2f93efCopy full SHA for c2f93ef
src/sasctl/utils/decorators.py
@@ -29,11 +29,15 @@ def _insert_docstring_text(func, text):
29
30
docstring = docstring.strip()
31
32
- text = ('',
33
- text,
34
- '')
+ # Sphinx formatting requires 2 blank lines after a numpydoc section or one
+ # blank line after another Sphinx directive.
+ if docstring.split('\n')[-1].startswith('.. '):
35
+ # Last line is another Sphinx directive
36
+ gap = '\n\n'
37
+ else:
38
+ gap = '\n\n\n'
39
- return docstring + '\n'.join(text)
40
+ return docstring + gap + text + '\n'
41
42
43
def deprecated(reason=None, version=None, removed_in=None):
0 commit comments