(tree: ast.AST, type_: Type[T])
Finds all nodes with type T.
Finds all nodes with type T.
Finds all nodes with type T .
def find(tree: ast.AST, type_: Type[T]) -> Iterable[T]:
    """Finds all nodes with type T."""
    for node in ast.walk(tree):
        if isinstance(node, type_):
            yield node
def find ( tree : ast . AST , type_ : Type [ T ] ) -> Iterable [ T ] : for node in ast . walk ( tree ) : if isinstance ( node , type_ ) : yield node