MCPcopy Index your code
hub / github.com/python/mypy / dump_line_checking_stats

Function dump_line_checking_stats

mypy/build.py:4203–4212  ·  view source on GitHub ↗

Dump per-line expression type checking stats.

(path: str, graph: Graph)

Source from the content-addressed store, hash-verified

4201
4202
4203def dump_line_checking_stats(path: str, graph: Graph) -> None:
4204 """Dump per-line expression type checking stats."""
4205 with open(path, "w") as f:
4206 for id in sorted(graph):
4207 if not graph[id].per_line_checking_time_ns:
4208 continue
4209 f.write(f"{id}:\n")
4210 for line in sorted(graph[id].per_line_checking_time_ns):
4211 line_time = graph[id].per_line_checking_time_ns[line]
4212 f.write(f"{line:>5} {line_time/1000:8.1f}\n")
4213
4214
4215def dump_graph(graph: Graph, stdout: TextIO | None = None) -> None:

Callers 1

build_innerFunction · 0.85

Calls 2

sortedFunction · 0.85
writeMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…