MCPcopy Index your code
hub / github.com/python/cpython / maybe_run

Function maybe_run

Tools/jit/_llvm.py:112–121  ·  view source on GitHub ↗

Run an LLVM tool if it can be found. Otherwise, return None.

(
    tool: str,
    args: typing.Iterable[str],
    echo: bool = False,
    llvm_version: str = _LLVM_VERSION,
)

Source from the content-addressed store, hash-verified

110
111
112async def maybe_run(
113 tool: str,
114 args: typing.Iterable[str],
115 echo: bool = False,
116 llvm_version: str = _LLVM_VERSION,
117) -> str | None:
118 """Run an LLVM tool if it can be found. Otherwise, return None."""
119
120 path = await _find_tool(tool, llvm_version, echo=echo)
121 return path and await _run(path, args, echo=echo)
122
123
124async def run(

Callers 1

runFunction · 0.85

Calls 2

_find_toolFunction · 0.85
_runFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…