MCPcopy Create free account
hub / github.com/ScaleML/AgentSPEX / _sanitize_filename

Function _sanitize_filename

src/sandbox_vm/tools/code/python.py:26–30  ·  view source on GitHub ↗
(name: str)

Source from the content-addressed store, hash-verified

24
25
26def _sanitize_filename(name: str) -> str:
27 name = (name or "").strip()
28 name = name.replace("/", "_").replace("\\", "_")
29 name = _SAFE_NAME_RE.sub("_", name)
30 return name or "script.py"
31
32
33def _clamp_timeout(t: int, low: int = 1, high: int = 300) -> int:

Callers 1

execute_python_codeFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected