sphinx-autodoc2 icon indicating copy to clipboard operation
sphinx-autodoc2 copied to clipboard

Type alias support

Open snorkysnark opened this issue 1 year ago • 0 comments

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

snorkysnark avatar Sep 23 '24 15:09 snorkysnark