Skip to content

get_withitem_calls

faststream.utils.ast.get_withitem_calls #

get_withitem_calls(node)
Source code in faststream/utils/ast.py
def get_withitem_calls(node: Union[ast.With, ast.AsyncWith]) -> List[str]:
    return [
        id
        for i in find_withitems(node)
        if (id := getattr(i.context_expr.func, "id", None))  # type: ignore[attr-defined]
    ]