sphinx-autodoc2
sphinx-autodoc2 copied to clipboard
Type alias support
For type aliases, one can either use the 3.12 syntax:
type Resolves[T] = T | OutputOf
which results in an error: WARNING: ralsei.graph.outputof: ralsei.graph.outputof: 'Resolves' is unknown [autodoc2.all_resolve]
or the older
Resolves: TypeAlias = T | OutputOf
which works but obscures the value: ralsei.graph.outputof.Resolves : TypeAlias = None
So there isn't a good way to document type aliases and what they refer to.
Sure you can replace them with autodoc2_replace_annotations, but I'd like the user to know what aliases exist as part of my API