Add `class-doc-from` option to the `autoclass` directive to control
the content of the specific class. It takes `class`, `init`, and `both`
like `autoclass_content`.
There is no docs and testcases for "None" argument of the program
directive. It has been implemented since very old version. But it's
not documented and tested long.
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.
Add a new config variable: python_use_unqualified_type_names. If enabled,
it goes to suppress the module name of the python reference if it can be
resolved.
To describe the purpose more accurately, the `master_doc` is now renamed
to `root_doc`. The old name is still available. But it is recommeneded
to use new one from now on.