The Annotated typing is a special type to add context-specific metadata to an annotation.
The doc-string generation could ignore it, as in the docs:
If a library or tool encounters an annotation Annotated[T, x] and has no special logic for the metadata, it should ignore the metadata and simply treat the annotation as T. As such, Annotated can be useful for code that wants to use annotations for purposes outside Python’s static typing system.
A direct use case for this can be, for instance, the Typer library.
The Annotated typing is a special type to add context-specific metadata to an annotation.
The doc-string generation could ignore it, as in the docs:
A direct use case for this can be, for instance, the Typer library.
Example code
Expected Result
Actual Result