Skip to content

Commit 269d3ab

Browse files
committed
remove None upstream handling from graphs
1 parent 9737377 commit 269d3ab

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

streamz/graph.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,6 @@ def create_graph(node, graph):
6969
"""
7070
# Step 1 build a set of all the nodes
7171
node_set = build_node_set(node)
72-
if None in node_set:
73-
node_set.remove(None)
7472

7573
# Step 2 for each node in the set add to the graph
7674
for n in node_set:
@@ -87,8 +85,7 @@ def create_graph(node, graph):
8785
# Step 3 for each node establish its edges
8886
for n in node_set:
8987
t = hash(n)
90-
upstreams = [_ for _ in n.upstreams if _ is not None]
91-
for nn in upstreams:
88+
for nn in n.upstreams:
9289
tt = hash(nn)
9390
graph.add_edge(tt, t)
9491

0 commit comments

Comments
 (0)