MCPcopy Create free account
hub / github.com/mkdocstrings/griffe / _render_call_graph

Function _render_call_graph

scripts/gen_structure_docs.py:21–32  ·  view source on GitHub ↗
(module: Path)

Source from the content-addressed store, hash-verified

19
20
21def _render_call_graph(module: Path) -> None:
22 buffer = StringIO()
23 code2flow(str(module), buffer)
24 try:
25 svg = subprocess.check_output(["dot", "-Tsvg"], input=buffer.getvalue(), text=True) # noqa: S607
26 except subprocess.CalledProcessError:
27 # The subprocess dies with SIGSEGV in GHA...
28 return
29 if 'class="node"' not in svg:
30 print()
31 else:
32 print(f'<div class="interactiveSVG code2flow">{svg}</div>')
33
34
35def _comment_block(module: Path) -> str:

Callers 1

_render_apiFunction · 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…