Annotations Module

Utilities for extracting types from annotations.

author:

Doug Skrypa

cli_command_parser.annotations.get_descriptor_value_type(command_cls: type, attr: str) type | None[source]
cli_command_parser.annotations.get_annotation_value_type(annotation, from_union: bool = True, from_collection: bool = True) type | None[source]
cli_command_parser.annotations.get_args(annotation) tuple[source]

Wrapper around typing.get_args() for 3.7~8 compatibility, to make it behave more like it does in 3.9+