Fix visited set bug in Graph class and refactor GenericNode component (#1917)
* format * chore: Fix visited set bug in Graph class * Refactor GenericNode component to improve build status handling
This commit is contained in:
parent
e43f56df32
commit
c3353bec37
3 changed files with 35 additions and 31 deletions
|
|
@ -468,9 +468,9 @@ class Graph:
|
|||
"""Marks a branch of the graph."""
|
||||
if visited is None:
|
||||
visited = set()
|
||||
visited.add(vertex_id)
|
||||
if vertex_id in visited:
|
||||
return
|
||||
visited.add(vertex_id)
|
||||
|
||||
self.mark_vertex(vertex_id, state)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue