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
| Name | Type | Required | |
|---|---|---|---|
anno | Any | The annotation to be analyzed. |
Returns
| Name | Type | |
|---|---|---|
v_1 | tuple[Any, ...] | A list of extracted arguments in the annotation. If the given annotation only has one argument, will be (anno,). |
v_2 | bool | A flag showing whether the annotation should be interpreted as async output. |
v_3 | bool | A flag showing whether the annotation should be interpreted as yielding values. |