diplomat.processing.type_casters.get_typecaster_annotations

diplomat.processing.type_casters.get_typecaster_annotations(func: TypeCasterFunction) Dict[str, TypeCaster][source]

Get the type casting annotations of a type caster function. This can be used for sanitizing command line arguments before passing them to this function.

Parameters:

func – The type caster function to extract arguments from.

Returns:

A dictionary of argument names to type caster types, describing the types of this type caster function.