Skip to content

Commit

Permalink
docs: add new option to documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
gschwaer committed Nov 29, 2021
1 parent 4ed4e2a commit 58a0190
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHANGES
Expand Up @@ -47,6 +47,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
----------
Expand Down
8 changes: 8 additions & 0 deletions doc/usage/extensions/autodoc.rst
Expand Up @@ -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
Expand Down

0 comments on commit 58a0190

Please sign in to comment.