Add special Keys and Tuple sections for autodoc.
Review Request #12514 — Created Aug. 8, 2022 and submitted
This introduces two new sections for docs:
Keys
andTuple
.Both are in standard attribute form, taking an identifier (a key name
forKeys
, 0-based index forTuple
), 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 |
---|---|
1852ad70a41a55e180c63dddb3132639e9ad7da7 |
- Change Summary:
-
Consolidated the logic for the type string formatting, improving it to link individual types within the string and to add emphasis to suffixes.
- Commits:
-
Summary ID 64a3c372df7441f5c97796a66896586df56e5f6d 1852ad70a41a55e180c63dddb3132639e9ad7da7