MCPcopy Index your code
hub / github.com/FastMAS/KVCOMM / get_call_str

Function get_call_str

KVCOMM/tools/coding/python_executor.py:12–19  ·  view source on GitHub ↗
(assert_statement: str)

Source from the content-addressed store, hash-verified

10import queue
11
12def get_call_str(assert_statement: str) -> str:
13 ast_parsed = ast.parse(assert_statement)
14 try:
15 call_str = ast_parsed.body[0].test.left
16 except:
17 call_str = ast_parsed.body[0].test
18
19 return astunparse.unparse(call_str).strip()
20
21def get_output(func: str, assert_statement: str, timeout: int = 5) -> str:
22 try:

Callers 1

get_outputFunction · 0.85

Calls 1

parseMethod · 0.45

Tested by

no test coverage detected