MCPcopy
hub / github.com/pypa/pipx / get_help

Function get_help

scripts/gen_doc_pages.py:10–21  ·  view source on GitHub ↗
(cmd: str | None)

Source from the content-addressed store, hash-verified

8
9
10def get_help(cmd: str | None) -> str:
11 base = ["pipx"]
12 args = base + ([cmd] if cmd else []) + ["--help"]
13 env_patch = os.environ.copy()
14 env_patch["PATH"] = os.pathsep.join([str(Path(sys.executable).parent)] + env_patch["PATH"].split(os.pathsep))
15 content = check_output(args, text=True, env=env_patch)
16 content = content.replace(str(Path("~").expanduser()), "~")
17 return f"""
18```
19{content}
20```
21"""
22
23
24params = {

Callers 1

gen_doc_pages.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected