Did I find the right examples for you? yes no

All Samples(2)  |  Call(1)  |  Derive(0)  |  Import(1)
Given an AST, return a list of module tuples for the imports found, in the
form:
    (modname, remote-name, local-name, lineno, pragma)

        def get_ast_imports(ast):
    """
    Given an AST, return a list of module tuples for the imports found, in the
    form:
        (modname, remote-name, local-name, lineno, pragma)
    """
    assert ast is not None
    vis = ImportVisitor()
    compiler.walk(ast, vis, ImportWalker(vis))
    found_imports = vis.finalize()
    return found_imports
        


src/s/n/snakefood-1.4/lib/python/snakefood/checker.py   snakefood(Download)
 
from snakefood.util import def_ignores, iter_pyfiles
from snakefood.find import parse_python_source, get_ast_imports
from snakefood.find import check_duplicate_imports
from snakefood.astpretty import printAst
        if ast is None:
            continue
        found_imports = get_ast_imports(ast)
 
        # Check for duplicate remote names imported.