Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/OpenCodeInterpreter/OpenCodeInterpreter
/ is_valid_python_code
Function
is_valid_python_code
demo/chatbot.py:103–108 ·
view source on GitHub ↗
(code)
Source
from the content-addressed store, hash-verified
101
return
[new_uuid, dialog_info[1]]
102
103
def
is_valid_python_code(code):
104
try
:
105
ast.parse(code)
106
return
True
107
except
SyntaxError:
108
return
False
109
110
111
class
InputFunctionVisitor(ast.NodeVisitor):
Callers
1
bot
Function · 0.85
Calls
no outgoing calls
Tested by
no test coverage detected