diff --git a/CHANGES b/CHANGES index fc2f0bc8864..a6ee3455bcf 100644 --- a/CHANGES +++ b/CHANGES @@ -67,6 +67,8 @@ Features added * #9695: More CSS classes on Javascript domain descriptions * #9683: Revert the removal of ``add_stylesheet()`` API. It will be kept until the Sphinx-6.0 release +* #9792: autodoc: Add new option for ``autodoc_typehints_description_target`` to + include undocumented return values but not undocumented parameters. Bugs fixed ---------- diff --git a/doc/usage/extensions/autodoc.rst b/doc/usage/extensions/autodoc.rst index c22b8b1ae62..a3980623df8 100644 --- a/doc/usage/extensions/autodoc.rst +++ b/doc/usage/extensions/autodoc.rst @@ -622,8 +622,16 @@ There are also config values that you can set: When set to ``"documented"``, types will only be documented for a parameter or a return value that is already documented by the docstring. + With ``"returnvalue_and_documented_params"``, parameter types will only be + annotated if the parameter is documented in the docstring. The return type is + always annotated (except if it is ``None``). + .. versionadded:: 4.0 + .. versionadded:: 4.3 + + New option ``'returnvalue_and_documented_params'`` is added. + .. confval:: autodoc_type_aliases A dictionary for users defined `type aliases`__ that maps a type name to the