Skip to main content

unpack_annotation

FunctionSource

(v_1: tuple[Any, ...], v_2: bool, v_3: bool) = unpack_annotation(anno: Any)

Unpack the annotation wrapper.

This method is mainly used for extracting the arguments in the wrapped returned annotation such as Generator[], Iterator[], and tuple[].

Arguments

Requires

NameTypeRequired
Description
annoAnyThe annotation to be analyzed.

Returns

NameType
Description
v_1tuple[Any, ...]A list of extracted arguments in the annotation. If the given annotation only has one argument, will be (anno,).
v_2boolA flag showing whether the annotation should be interpreted as async output.
v_3boolA flag showing whether the annotation should be interpreted as yielding values.