diff --git a/CHANGES b/CHANGES index d55f3dc8c..f9844e53b 100644 --- a/CHANGES +++ b/CHANGES @@ -16,6 +16,8 @@ Incompatible changes MathJax configuration may have to set the old MathJax path or update their configuration for version 3. See :mod:`sphinx.ext.mathjax`. * #7784: i18n: The msgid for alt text of image is changed +* #5560: napoleon: :confval:`napoleon_use_param` also affect "other parameters" + section * #7996: manpage: Make a section directory on build manpage by default (see :confval:`man_make_section_directory`) * #8380: html search: search results are wrapped with ``
`` instead of
diff --git a/sphinx/ext/napoleon/docstring.py b/sphinx/ext/napoleon/docstring.py
index 755088ca5..a5a986e49 100644
--- a/sphinx/ext/napoleon/docstring.py
+++ b/sphinx/ext/napoleon/docstring.py
@@ -682,7 +682,13 @@ class GoogleDocstring:
return self._parse_generic_section(_('Notes'), use_admonition)
def _parse_other_parameters_section(self, section: str) -> List[str]:
- return self._format_fields(_('Other Parameters'), self._consume_fields())
+ if self._config.napoleon_use_param:
+ # Allow to declare multiple parameters at once (ex: x, y: int)
+ fields = self._consume_fields(multiple=True)
+ return self._format_docutils_params(fields)
+ else:
+ fields = self._consume_fields()
+ return self._format_fields(_('Other Parameters'), fields)
def _parse_parameters_section(self, section: str) -> List[str]:
if self._config.napoleon_use_param:
diff --git a/tests/test_ext_napoleon_docstring.py b/tests/test_ext_napoleon_docstring.py
index ec5f90ac2..4ee66aaa5 100644
--- a/tests/test_ext_napoleon_docstring.py
+++ b/tests/test_ext_napoleon_docstring.py
@@ -1441,12 +1441,18 @@ Parameters
----------
param1 : :class:`MyClass