MCPcopy
hub / github.com/NVIDIA/TensorRT-LLM / form_command

Function form_command

scripts/package_trt_llm.py:46–54  ·  view source on GitHub ↗
(search_string: str)

Source from the content-addressed store, hash-verified

44 on_windows = platform.system() == "Windows"
45
46 def form_command(search_string: str) -> Tuple[str]:
47 if on_windows:
48 # Switch exit codes so that 0 is found and 1 is not-found to match linux code-path.
49 return (
50 "powershell", "-Command",
51 f"if (Get-ChildItem -Recurse \"{str(src_dir.absolute())}\" | Select-String \"{search_string}\")",
52 "{ exit 0 }", "else", "{ exit 1 }")
53 else:
54 return ('grep', search_string, '-R', str(src_dir.absolute()))
55
56 exceptions = []
57 for search_string in symbols:

Callers 1

_check_banned_symbolsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected