Exemplo n.º 1
0
def verify_dependencies(state: State, manager: BuildManager) -> None:
    """Report errors for import targets in module that don't exist."""
    for dep in state.dependencies + state.suppressed:  # TODO: ancestors?
        if dep not in manager.modules:
            assert state.tree
            line = find_import_line(state.tree, dep) or 1
            assert state.path
            manager.module_not_found(state.path, state.id, line, dep)
Exemplo n.º 2
0
def verify_dependencies(state: State, manager: BuildManager) -> None:
    """Report errors for import targets in module that don't exist."""
    # Strip out indirect dependencies. See comment in build.load_graph().
    dependencies = [dep for dep in state.dependencies if state.priorities.get(dep) != PRI_INDIRECT]
    for dep in dependencies + state.suppressed:  # TODO: ancestors?
        if dep not in manager.modules and not manager.options.ignore_missing_imports:
            assert state.tree
            line = state.dep_line_map.get(dep, 1)
            assert state.path
            manager.module_not_found(state.path, state.id, line, dep)
Exemplo n.º 3
0
def verify_dependencies(state: State, manager: BuildManager) -> None:
    """Report errors for import targets in module that don't exist."""
    # Strip out indirect dependencies. See comment in build.load_graph().
    dependencies = [dep for dep in state.dependencies if state.priorities.get(dep) != PRI_INDIRECT]
    for dep in dependencies + state.suppressed:  # TODO: ancestors?
        if dep not in manager.modules and not manager.options.ignore_missing_imports:
            assert state.tree
            line = find_import_line(state.tree, dep) or 1
            assert state.path
            manager.module_not_found(state.path, state.id, line, dep)