Tweak syntax of extlinks to also allow ``%s`` in the link caption part.
Like for the base URL ``%s`` will be substituted with the content of the
role. This allows configurations like
extlinks = {'quarter': ('https://example.org/quaters/%s',
'%s. quarter')}
with ``:quarter:`2``` getting replaced by a link titled `2. quarter`.
The requirement for the caption string is to be either None or contain
exactly one ``%s``. If neither is the case, then we emit a warning and
fall back to the old behaviour which is concatenating the caption string
with the role content.
Previously, if autodoc_typehints="description", a :type: field would be
added for every parameter and return type appearing in the annotation,
including **kwargs and underscore-prefixed parameters that are meant to
be private, as well as None return types.
This commit introduces a new option, "autodoc_typehint_undoc". By
default this option is True, requesting the old behavior. By setting
this option to False, :type: and :rtype: fields will only be added for
annotated parameters or return types if there is already a corresponding
:param: or :return: field, to put users in control over whether a given
parameter is documented or not.
Add a new extension `sphinx.ext.autodoc.preserve_defaults`.
It preserves the default argument values of function signatures in source code
and keep them not evaluated for readability. This is an experimental
extension and it will be integrated into autodoc core in Sphinx-4.0.
autodata and autoattribute directives does not show right-hand value of
the variable if its docstring contains ``:meta hide-value:`` in
info-field-list.
Trailing whitespace do not have impact on the result, they are just
unused bytes. Most text editors are configured to strip trailing
whitespaces. Remove them all in one go.
Update a handful of files to use the UNIX line ending.
To control trimming doctest flags manually, this adds new options
:trim-doctest-flags: and :no-trim-doctest-flags: to doctest
directives. It helps to describes doctest module itself in python
doc (see #6698).