Method: pylint.graph.get_cycles
Calls: 1012, Exceptions: 0, Paths: 2Back
Path 1: 953 calls (0.94)
defaultdict (953)
[] (953)
() (953)
1def get_cycles(
2 graph_dict: dict[str, set[str]], vertices: list[str] | None = None
3) -> Sequence[list[str]]:
4 """Return a list of detected cycles based on an ordered graph (i.e. keys are
5 vertices and values are lists of destination vertices representing edges).
6 """
7 if not graph_dict:
8 return ()
9 result: list[list[str]] = []
10 if vertices is None:
11 vertices = list(graph_dict.keys())
12 for vertice in vertices:
13 _get_cycles(graph_dict, [], set(), result, vertice)
14 return result
Path 2: 59 calls (0.06)
defaultdict (59)
['test_pylint_runners'] (3) ['package'] (2) ['data.clientmodule_test'] (2) ['input.func_w0401_disabled', 'input.w0401_cycle'] (1) ['input.func_w0401_p...
[] (56) list (3)
1def get_cycles(
2 graph_dict: dict[str, set[str]], vertices: list[str] | None = None
3) -> Sequence[list[str]]:
4 """Return a list of detected cycles based on an ordered graph (i.e. keys are
5 vertices and values are lists of destination vertices representing edges).
6 """
7 if not graph_dict:
8 return ()
9 result: list[list[str]] = []
10 if vertices is None:
11 vertices = list(graph_dict.keys())
12 for vertice in vertices:
13 _get_cycles(graph_dict, [], set(), result, vertice)
14 return result