(args: list[str])
| 75 | |
| 76 | |
| 77 | def 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) |
nothing calls this directly
no test coverage detected
searching dependent graphs…