toucan_data_sdk/utils/helpers.py
def resolve_dependencies(func_name, dependencies):
    """ Given a function name and a mapping of function dependencies,
        returns a list of *all* the dependencies for this function. """

    def _resolve_deps(func_name, func_deps):
        """ Append dependencies recursively to func_deps (accumulator) """
        if func_name in func_deps:
            return

        func_deps.append(func_name)
        for dep in dependencies.get(func_name, []):
            _resolve_deps(dep, func_deps)

    func_deps = []
    _resolve_deps(func_name, func_deps)
    return sorted(func_deps)
def resolve_dependencies(func_name, dependencies):
    """ Given a function name and a mapping of function dependencies,
        returns a list of *all* the dependencies for this function. """

    def _resolve_deps(func_name, func_deps):
        """ Append dependencies recursively to func_deps (accumulator) """
        if func_name in func_deps:
            return

        func_deps.append(func_name)
        for dep in dependencies.get(func_name, []):
            _resolve_deps(dep, func_deps)

    func_deps = []
    _resolve_deps(func_name, func_deps)
    return sorted(func_deps)
def resolve_dependencies ( func_name , dependencies ) : def _resolve_deps ( func_name , func_deps ) : """ Append dependencies recursively to func_deps (accumulator) """ if func_name in func_deps : return func_deps . append ( func_name ) for dep in dependencies . get ( func_name , [ ] ) : _resolve_deps ( dep , func_deps ) func_deps = [ ] _resolve_deps ( func_name , func_deps ) return sorted ( func_deps )
Given a function name and a mapping of function dependencies,
        returns a list of *all* the dependencies for this function.
Given a function name and a mapping of function dependencies returns a list of * all * the dependencies for this function .