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

Function run_cmd

runtests.py:114–130  ·  view source on GitHub ↗
(name: str)

Source from the content-addressed store, hash-verified

112
113
114def run_cmd(name: str) -> int:
115 status = 0
116 if name in cmds:
117 cmd = cmds[name]
118 else:
119 if name.endswith(".test"):
120 cmd = ["pytest", f"mypy/test/testcheck.py::TypeCheckSuite::{name}"]
121 else:
122 cmd = ["pytest", "-n0", "-k", name]
123 print(f"run {name}: {cmd}")
124 proc = subprocess.run(cmd, stderr=subprocess.STDOUT)
125 if proc.returncode:
126 print("\nFAILED: %s" % name)
127 status = proc.returncode
128 if name in FAST_FAIL:
129 exit(status)
130 return status
131
132
133def start_background_cmd(name: str) -> Popen:

Callers 1

mainFunction · 0.70

Calls 4

printFunction · 0.85
exitFunction · 0.85
endswithMethod · 0.45
runMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…