We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 10fe1f5 commit 2b5877bCopy full SHA for 2b5877b
ogc/bblocks/models.py
@@ -521,7 +521,7 @@ def __init__(self,
521
while cycles:
522
#for cycle in cycles:
523
# dep_graph.remove_edge(cycle[0], cycle[1])
524
- dep_graph.remove_edges_from((cycle[0], cycle[-1]) for cycle in cycles)
+ dep_graph.remove_edges_from((cycle[0], cycle[min(1, len(cycle) - 1)]) for cycle in cycles)
525
cycles = list(nx.simple_cycles(dep_graph))
526
self.bblocks: dict[str, BuildingBlock] = {b: self.bblocks[b]
527
for b in nx.topological_sort(dep_graph)
0 commit comments