MCPcopy Create free account
hub / github.com/ParzivalHack/PySpector / _wrap_in_function

Function _wrap_in_function

tests/unit/test_taint_engine_extension.py:18–21  ·  view source on GitHub ↗

Wrap code in a function so the taint engine's CFG builder processes it.

(code: str)

Source from the content-addressed store, hash-verified

16
17
18def _wrap_in_function(code: str) -> str:
19 """Wrap code in a function so the taint engine's CFG builder processes it."""
20 indented = "\n".join(" " + line for line in textwrap.dedent(code).splitlines())
21 return f"def _test_view(request):\n{indented}\n"
22
23
24def run_pyspector(code: str, *, filename: str = "app.py") -> list[dict]:

Callers 1

run_pyspectorFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected