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

Function run_dmypy

mypy/api.py:77–95  ·  view source on GitHub ↗
(args: list[str])

Source from the content-addressed store, hash-verified

75
76
77def run_dmypy(args: list[str]) -> tuple[str, str, int]:
78 from mypy.dmypy.client import main
79
80 # A bunch of effort has been put into threading stdout and stderr
81 # through the main API to avoid the threadsafety problems of
82 # modifying sys.stdout/sys.stderr, but that hasn't been done for
83 # the dmypy client, so we just do the non-threadsafe thing.
84 def f(stdout: TextIO, stderr: TextIO) -> None:
85 old_stdout = sys.stdout
86 old_stderr = sys.stderr
87 try:
88 sys.stdout = stdout
89 sys.stderr = stderr
90 main(args)
91 finally:
92 sys.stdout = old_stdout
93 sys.stderr = old_stderr
94
95 return _run(f)

Callers

nothing calls this directly

Calls 1

_runFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…