File tree Expand file tree Collapse file tree 1 file changed +3
-7
lines changed
Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Original file line number Diff line number Diff line change 11import ast
22import logging
3- from collections .abc import Generator
3+ from collections .abc import Generator , Mapping
44from graphlib import TopologicalSorter
55from pathlib import Path
66from typing import Iterable
@@ -207,18 +207,14 @@ def find_all_dependents(
207207 return visited
208208
209209
210- class CircularDependency (Exception ):
211- pass
212-
213-
214- def topo_sort (graph : dict [str , set [str ]]) -> list [str ]:
210+ def topo_sort (graph : Mapping [str , set [str ]]) -> list [str ]:
215211 """Topological sort
216212
217213 Args:
218214 graph (Mapping[str, set[str]]): Dependency graph
219215
220216 Raises:
221- CircularDependency : Raised if a cycle is detected
217+ CycleError : Raised if a cycle is detected
222218
223219 Returns:
224220 list[str]: Ordered list of the nodes
You can’t perform that action at this time.
0 commit comments