(obj: object)
| 609 | |
| 610 | |
| 611 | def _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 | |
| 627 | class Task(GraphNode): |