diff --git a/src/taskgraph/optimize/base.py b/src/taskgraph/optimize/base.py index 3d2776a87..c291d4a8f 100644 --- a/src/taskgraph/optimize/base.py +++ b/src/taskgraph/optimize/base.py @@ -297,8 +297,9 @@ def replace_tasks( opt_counts = defaultdict(int) replaced = set() - dependents_of = target_task_graph.graph.reverse_links_dict() - dependencies_of = target_task_graph.graph.links_dict() + dependencies_of, dependents_of = ( + target_task_graph.graph.links_and_reverse_links_dict() + ) for label in target_task_graph.graph.visit_postorder(): logger.debug(f"replace_tasks: {label}")