module documentation

Graph manipulation utilities. (dot generation adapted from pypy/translator/tool/make_dot.py)

Class DotBackend Dot File back-end.
Function get_cycles Return a list of detected cycles based on an ordered graph (i.e. keys are vertices and values are lists of destination vertices representing edges).
Function normalize_node_id Returns a suitable DOT node id for `nid`.
Function target_info_from_filename Transforms /some/path/foo.png into ('/some/path', 'foo.png', 'png').
Function _get_cycles Recursive function doing the real work for get_cycles.
def get_cycles(graph_dict: dict[str, set[str]], vertices: list[str]|None = None) -> Sequence[list[str]]: (source)

Return a list of detected cycles based on an ordered graph (i.e. keys are vertices and values are lists of destination vertices representing edges).

def normalize_node_id(nid: str) -> str: (source)

Returns a suitable DOT node id for `nid`.

def target_info_from_filename(filename: str) -> tuple[str, str, str]: (source)

Transforms /some/path/foo.png into ('/some/path', 'foo.png', 'png').

def _get_cycles(graph_dict: dict[str, set[str]], path: list[str], visited: set[str], result: list[list[str]], vertice: str): (source)

Recursive function doing the real work for get_cycles.