MCPcopy Create free account
hub / github.com/dask/dask / _get_dependencies

Function _get_dependencies

dask/_task_spec.py:611–624  ·  view source on GitHub ↗
(obj: object)

Source from the content-addressed store, hash-verified

609
610
611def _get_dependencies(obj: object) -> set | frozenset:
612 if isinstance(obj, TaskRef):
613 return {obj.key}
614 elif isinstance(obj, GraphNode):
615 return obj.dependencies
616 elif isinstance(obj, dict):
617 if not obj:
618 return _no_deps
619 return set().union(*map(_get_dependencies, obj.values()))
620 elif isinstance(obj, (list, tuple, frozenset, set)):
621 if not obj:
622 return _no_deps
623 return set().union(*map(_get_dependencies, obj))
624 return _no_deps
625
626
627class Task(GraphNode):

Callers 1

test_array_as_argumentFunction · 0.90

Calls 2

setClass · 0.85
valuesMethod · 0.45

Tested by 1

test_array_as_argumentFunction · 0.72