From c5fe0358c8c3eaf0d7c9b9291f17bd9a426cedb4 Mon Sep 17 00:00:00 2001
From: Andreas Kloeckner <inform@tiker.net>
Date: Mon, 1 Jul 2024 13:36:17 -0500
Subject: [PATCH] Fix an instance of new flake8-comprehensions warning

---
 pytools/graph.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pytools/graph.py b/pytools/graph.py
index 1a02484..9fd6f26 100644
--- a/pytools/graph.py
+++ b/pytools/graph.py
@@ -287,7 +287,7 @@ def compute_topological_order(graph: GraphT[NodeT],
 
     # {{{ compute nodes_to_num_predecessors
 
-    nodes_to_num_predecessors = {node: 0 for node in graph}
+    nodes_to_num_predecessors = dict.fromkeys(graph, 0)
 
     for node in graph:
         for child in graph[node]:
-- 
GitLab