Beispiel #1
0
def update_deps(module_id: str, nodes: List[DeferredNode], graph: Dict[str,
                                                                       State],
                deps: Dict[str, Set[str]], options: Options) -> None:
    for deferred in nodes:
        node = deferred.node
        type_map = graph[module_id].type_map()
        new_deps = get_dependencies_of_target(module_id, node, type_map,
                                              options.python_version)
        for trigger, targets in new_deps.items():
            deps.setdefault(trigger, set()).update(targets)
Beispiel #2
0
def update_deps(module_id: str, nodes: List[DeferredNode],
                graph: Dict[str, State], deps: Dict[str, Set[str]]) -> None:
    for deferred in nodes:
        node = deferred.node
        prefix = module_id
        if isinstance(node, FuncBase) and node.info:
            prefix += '.{}'.format(node.info.name())
        type_map = graph[module_id].type_checker.type_map
        new_deps = get_dependencies_of_target(prefix, node, type_map)
        for trigger, targets in new_deps.items():
            deps.setdefault(trigger, set()).update(targets)
Beispiel #3
0
def update_deps(module_id: str, nodes: List[DeferredNode], graph: Dict[str,
                                                                       State],
                deps: Dict[str, Set[str]], options: Options) -> None:
    for deferred in nodes:
        node = deferred.node
        type_map = graph[module_id].type_map()
        tree = graph[module_id].tree
        assert tree is not None, "Tree must be processed at this stage"
        new_deps = get_dependencies_of_target(module_id, tree, node, type_map,
                                              options.python_version)
        for trigger, targets in new_deps.items():
            deps.setdefault(trigger, set()).update(targets)
Beispiel #4
0
def update_deps(module_id: str,
                nodes: List[DeferredNode],
                graph: Dict[str, State],
                deps: Dict[str, Set[str]],
                options: Options) -> None:
    for deferred in nodes:
        node = deferred.node
        type_map = graph[module_id].type_map()
        tree = graph[module_id].tree
        assert tree is not None, "Tree must be processed at this stage"
        new_deps = get_dependencies_of_target(module_id, tree, node, type_map,
                                              options.python_version)
        for trigger, targets in new_deps.items():
            deps.setdefault(trigger, set()).update(targets)