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

Function _run

mypy/api.py:54–65  ·  view source on GitHub ↗
(main_wrapper: Callable[[TextIO, TextIO], None])

Source from the content-addressed store, hash-verified

52
53
54def _run(main_wrapper: Callable[[TextIO, TextIO], None]) -> tuple[str, str, int]:
55 stdout = StringIO()
56 stderr = StringIO()
57
58 try:
59 main_wrapper(stdout, stderr)
60 exit_status = 0
61 except SystemExit as system_exit:
62 assert isinstance(system_exit.code, int)
63 exit_status = system_exit.code
64
65 return stdout.getvalue(), stderr.getvalue(), exit_status
66
67
68def run(args: list[str]) -> tuple[str, str, int]:

Callers 2

runFunction · 0.85
run_dmypyFunction · 0.85

Calls 1

isinstanceFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…