MCPcopy Index your code
hub / github.com/python/cpython / CycleError

Class CycleError

Lib/graphlib.py:26–38  ·  view source on GitHub ↗

Subclass of ValueError raised by TopologicalSorter.prepare if cycles exist in the working graph. If multiple cycles exist, only one undefined choice among them will be reported and included in the exception. The detected cycle can be accessed via the second element in the *args* att

Source from the content-addressed store, hash-verified

24
25
26class CycleError(ValueError):
27 """Subclass of ValueError raised by TopologicalSorter.prepare if cycles
28 exist in the working graph.
29
30 If multiple cycles exist, only one undefined choice among them will be reported
31 and included in the exception. The detected cycle can be accessed via the second
32 element in the *args* attribute of the exception instance and consists in a list
33 of nodes, such that each node is, in the graph, an immediate predecessor of the
34 next node in the list. In the reported list, the first and the last node will be
35 the same, to make it clear that it is cyclic.
36 """
37
38 pass
39
40
41class TopologicalSorter:

Callers 1

prepareMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…