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

Function edit_python_file

misc/perf_compare.py:75–80  ·  view source on GitHub ↗
(fnam: str)

Source from the content-addressed store, hash-verified

73
74
75def edit_python_file(fnam: str) -> None:
76 with open(fnam) as f:
77 data = f.read()
78 data += "\n#"
79 with open(fnam, "w") as f:
80 f.write(data)
81
82
83def run_benchmark(

Callers 1

run_benchmarkFunction · 0.85

Calls 2

readMethod · 0.45
writeMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…