Add special Keys and Tuple sections for autodoc.

Review Request #12514 — Created Aug. 8, 2022 and submitted — Latest diff uploaded

Information

beanbag-docutils
master

Reviewers

This introduces two new sections for docs: Keys and Tuple.

Both are in standard attribute form, taking an identifier (a key name
for Keys, 0-based index for Tuple), a type, and a description.
They're then turned into a standard attribute display, with types
turning into reference links.

For example:

Keys:
    key1 (int):
        Some description.

    key2 (str, optional):
        Another description.

Tuple:
    0 (int):
        Some description.

    1 (str, optional):
        Another description.

This will help keep documentation consistent and clean.

The change also improves upon the typing, taking advantage of modern
support in the Napoleon extension to do type link referencing, and
extends it to more formally support our suffixes like , optional.

Unit tests pass.

Tested this with our existing documentation. Saw the improved output.

Commits

Files

    Loading...