Add special Keys and Tuple sections for autodoc.
Review Request #12514 — Created Aug. 8, 2022 and submitted
This introduces two new sections for docs:
Both are in standard attribute form, taking an identifier (a key name
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.
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
Unit tests pass.
Tested this with our existing documentation. Saw the improved output.
Consolidated the logic for the type string formatting, improving it to link individual types within the string and to add emphasis to suffixes.
Revision 2 (+206 -22)
Checks run (2 succeeded)