tools/android/dependency_analysis/print_package_dependencies.py
def print_package_dependencies_for_key(package_graph, key, ignore_subpackages):
    """Prints dependencies for a valid key into the package graph.

    Since we store self-edges for the package graph
    but they aren't relevant in this case, we skip them.
    """
    node = package_graph.get_node_by_key(key)

    inbound_without_self = [other for other in node.inbound if other != node]
    print(f'{len(inbound_without_self)} inbound dependency(ies) '
          f'for {node.name}:')
    for inbound_dep in graph.sorted_nodes_by_name(inbound_without_self):
        if ignore_subpackages and inbound_dep.name.startswith(node.name):
            continue
        print_package_dependencies_for_edge(inbound_dep, node)

    outbound_without_self = [other for other in node.outbound if other != node]
    print(f'{len(outbound_without_self)} outbound dependency(ies) '
          f'for {node.name}:')
    for outbound_dep in graph.sorted_nodes_by_name(outbound_without_self):
        if ignore_subpackages and outbound_dep.name.startswith(node.name):
            continue
        print_package_dependencies_for_edge(node, outbound_dep)
Prints dependencies for a valid key into the package graph.

    Since we store self-edges for the package graph
    but they aren't relevant in this case, we skip them.
    
Prints dependencies for a valid key into the package graph.
Since we store self-edges for the package graph
but they aren't relevant in this case, we skip them.
Prints dependencies for a valid key into the package graph . Since we store self - edges for the package graph but they aren ' t relevant in this case we skip them .
def print_package_dependencies_for_key(package_graph, key, ignore_subpackages):
    node = package_graph.get_node_by_key(key)
    inbound_without_self = [other for other in node.inbound if other != node]
    print(f'{len(inbound_without_self)} inbound dependency(ies) '
          f'for {node.name}:')
    for inbound_dep in graph.sorted_nodes_by_name(inbound_without_self):
        if ignore_subpackages and inbound_dep.name.startswith(node.name):
            continue
        print_package_dependencies_for_edge(inbound_dep, node)
    outbound_without_self = [other for other in node.outbound if other != node]
    print(f'{len(outbound_without_self)} outbound dependency(ies) '
          f'for {node.name}:')
    for outbound_dep in graph.sorted_nodes_by_name(outbound_without_self):
        if ignore_subpackages and outbound_dep.name.startswith(node.name):
            continue
        print_package_dependencies_for_edge(node, outbound_dep)
def print_package_dependencies_for_key ( package_graph , key , ignore_subpackages ) : node = package_graph . get_node_by_key ( key ) inbound_without_self = [ other for other in node . inbound if other != node ] print ( f'{len(inbound_without_self)} inbound dependency(ies) ' f'for {node.name}:' ) for inbound_dep in graph . sorted_nodes_by_name ( inbound_without_self ) : if ignore_subpackages and inbound_dep . name . startswith ( node . name ) : continue print_package_dependencies_for_edge ( inbound_dep , node ) outbound_without_self = [ other for other in node . outbound if other != node ] print ( f'{len(outbound_without_self)} outbound dependency(ies) ' f'for {node.name}:' ) for outbound_dep in graph . sorted_nodes_by_name ( outbound_without_self ) : if ignore_subpackages and outbound_dep . name . startswith ( node . name ) : continue print_package_dependencies_for_edge ( node , outbound_dep )
Prints dependencies for a valid key into the package graph.
Prints dependencies for a valid key into the package graph .
"""Prints dependencies for a valid key into the package graph.

    Since we store self-edges for the package graph
    but they aren't relevant in this case, we skip them.
    """
package_graph
key
ignore_subpackages