* The directive option ``:noindex:`` was renamed to ``:no-index:``.
* The directive option ``:noindexentry:`` was renamed to ``:no-index-entry:``.
* The directive option ``:nocontentsentry:`` was renamed to ``:no-contents-entry:``.
The previous names are retained as aliases, but will be deprecated
and removed in a future version of Sphinx (9.0 or later).
The current implementation of ``sphinx.ext.coverage`` outputs which
methods,classes, and functions are documented.
This commit adds a short summary of this report in terms of
``documented objects / total number of objects``,
both per module and total.
The purpose of this is to support
a currently not mainstream but relevant use-case:
a coverage report on the number of objects that are documented.
By having the statistics on the report or on the stdout,
a regex expression can capture the coverage percentage
(e.g. ``re.search(r'TOTAL.*?([0-9.]{4,6}\%)', d).group(1)``)
and use it e.g. in another report, a status badge, etc.
Two options were added to the configuration to allow a table
to be printed in the report and/or to stdout.
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
``util.inspect.object_description`` already attempts to sort collections, but this can fail.
This commit handles the failure case by using string-based object descriptions
as a fallback deterministic sort ordering, and protects against recursive collections.
Co-authored-by: Chris Lamb <lamby@debian.org>
Co-authored-by: Faidon Liambotis <paravoid@debian.org>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
* Generic classes can be documented with ``.. py:class::`` using PEP 695 syntax:
.. code:: rst
.. py:class:: Sequence[T]
* Generic functions can be documented with ``.. py:function::`` using PEP 695 syntax:
.. code:: rst
.. py:function:: foo[T](x: T)
* Default values for type bounds are supported.
Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
This particular commit ensures that the ``translated`` attribute
is retained on translated nodes so that developers may use it
to improve the experience on translations.
This attribute can be useful to calculate
the translated percentage of a particular document,
to visually mark paragraphs as not translated,
and many other applications.
Fix the field list field name recognition regular expression to avoid false positives,
as interpreted text roles may not be field name blocks.
Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>