diff --git a/doc/example.py b/doc/example.py index 425c8928..c55d64df 100644 --- a/doc/example.py +++ b/doc/example.py @@ -62,6 +62,7 @@ def foo(var1, var2, long_var_name='hi'): Explanation of return value named `describe`. out : type Explanation of `out`. + type_without_description Other Parameters ---------------- diff --git a/numpydoc/docscrape_sphinx.py b/numpydoc/docscrape_sphinx.py index ff5be26c..640efa7b 100644 --- a/numpydoc/docscrape_sphinx.py +++ b/numpydoc/docscrape_sphinx.py @@ -200,10 +200,12 @@ def _str_param_list(self, name, fake_autosummary=False): param_type)]) else: out += self._str_indent([display_param]) - if desc: - if self.use_blockquotes: - out += [''] - out += self._str_indent(desc, 8) + if desc and self.use_blockquotes: + out += [''] + elif not desc: + # empty definition + desc = ['..'] + out += self._str_indent(desc, 8) out += [''] return out diff --git a/numpydoc/tests/test_docscrape.py b/numpydoc/tests/test_docscrape.py index 8fa3d23f..fa3f700f 100644 --- a/numpydoc/tests/test_docscrape.py +++ b/numpydoc/tests/test_docscrape.py @@ -1147,6 +1147,7 @@ def no_period(self): But a description no_docstring2 : str + .. :obj:`multiline_sentence ` This is a sentence.