MCPcopy Index your code
hub / github.com/evalplus/evalplus / syntax_check

Function syntax_check

evalplus/syncheck.py:14–21  ·  view source on GitHub ↗
(code, verbose=False)

Source from the content-addressed store, hash-verified

12
13
14def syntax_check(code, verbose=False):
15 try:
16 ast.parse(code)
17 return True
18 except (SyntaxError, MemoryError):
19 if verbose:
20 traceback.print_exc()
21 return False
22
23
24def script(

Callers 4

code_extractFunction · 0.90
sanitizeFunction · 0.90
scriptFunction · 0.85
post_processFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…