scripts/deps.py
def find_crates(path):
    """
    Recursively finds all sub-crates.
    :param path: The path to start searching in
    :return: A list of tuples [(<path>, <crate data>), ...].
    """
    def find_crates_recursive(directory):
        crates = []

        # Check current path
        cargo_toml = os.path.join(directory, 'Cargo.toml')
        if os.path.isfile(cargo_toml):
            data = load_cargo_toml(cargo_toml)
            if data is not None:
                crates.append((directory, data))

        # Then check sub directories
        for file in os.listdir(directory):
            filename = os.path.join(directory, file)
            # We are only interested in directories
            if not os.path.isdir(filename):
                continue
            crates.extend(find_crates_recursive(filename))

        return crates

    return find_crates_recursive(path)

    Recursively finds all sub-crates.
    :param path: The path to start searching in
    :return: A list of tuples [(<path>, <crate data>), ...].
    
Recursively finds all sub-crates.
Recursively finds all sub - crates .
def find_crates(path):
    def find_crates_recursive(directory):
        crates = []
        cargo_toml = os.path.join(directory, 'Cargo.toml')
        if os.path.isfile(cargo_toml):
            data = load_cargo_toml(cargo_toml)
            if data is not None:
                crates.append((directory, data))
        for file in os.listdir(directory):
            filename = os.path.join(directory, file)
            if not os.path.isdir(filename):
                continue
            crates.extend(find_crates_recursive(filename))
        return crates
    return find_crates_recursive(path)
def find_crates ( path ) : def find_crates_recursive ( directory ) : crates = [ ] cargo_toml = os . path . join ( directory , 'Cargo.toml' ) if os . path . isfile ( cargo_toml ) : data = load_cargo_toml ( cargo_toml ) if data is not None : crates . append ( ( directory , data ) ) for file in os . listdir ( directory ) : filename = os . path . join ( directory , file ) if not os . path . isdir ( filename ) : continue crates . extend ( find_crates_recursive ( filename ) ) return crates return find_crates_recursive ( path )
Recursively finds all sub-crates.
Recursively finds all sub - crates .
"""
    Recursively finds all sub-crates.
    :param path: The path to start searching in
    :return: A list of tuples [(<path>, <crate data>), ...].
    """ # Check current path # Then check sub directories # We are only interested in directories
None
path
The path to start searching in
The path to start searching in