Add special Keys and Tuple sections for autodoc.

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

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.

Summary ID
Add special Keys and Tuple sections for autodoc.
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: ```restructuredtext 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`.
1852ad70a41a55e180c63dddb3132639e9ad7da7
chipx86
david
  1. Ship It!
  2. 
      
chipx86
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to master (33f55f9)
Loading...