tools/dep_tree_resolver/dep_why.py
def dep_why(dep_tree_filename, target_module):
    """
    This method recursively goes down the dependency tree and prints out
    the branches that lead to the specified target module
    """

    print(f"Searching for '{target_module}' in {dep_tree_filename}...")

    found = False
    current_path = []
    with open(dep_tree_filename) as infile:
        for line in infile:
            level, module_dep = parse_line(line)

            current_path = current_path[: level + 1]

            current_path.append(module_dep)

            module_name = module_dep.split('@')[0]
            if module_name == target_module:
                found = True
                print(current_path[1:])

    if not found:
        print(f"'{target_module}' was not found in the dependency tree!")

    This method recursively goes down the dependency tree and prints out
    the branches that lead to the specified target module
    
This method recursively goes down the dependency tree and prints out
the branches that lead to the specified target module
This method recursively goes down the dependency tree and prints out the branches that lead to the specified target module
def dep_why(dep_tree_filename, target_module):
    print(f"Searching for '{target_module}' in {dep_tree_filename}...")
    found = False
    current_path = []
    with open(dep_tree_filename) as infile:
        for line in infile:
            level, module_dep = parse_line(line)
            current_path = current_path[: level + 1]
            current_path.append(module_dep)
            module_name = module_dep.split('@')[0]
            if module_name == target_module:
                found = True
                print(current_path[1:])
    if not found:
        print(f"'{target_module}' was not found in the dependency tree!")
def dep_why ( dep_tree_filename , target_module ) : print ( f"Searching for '{target_module}' in {dep_tree_filename}..." ) found = False current_path = [ ] with open ( dep_tree_filename ) as infile : for line in infile : level , module_dep = parse_line ( line ) current_path = current_path [ : level + 1 ] current_path . append ( module_dep ) module_name = module_dep . split ( '@' ) [ 0 ] if module_name == target_module : found = True print ( current_path [ 1 : ] ) if not found : print ( f"'{target_module}' was not found in the dependency tree!" )
This method recursively goes down the dependency tree and prints out
the branches that lead to the specified target module
This method recursively goes down the dependency tree and prints out the branches that lead to the specified target module
"""
    This method recursively goes down the dependency tree and prints out
    the branches that lead to the specified target module
    """
dep_tree_filename
target_module