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

Function check_valid

tools/humaneval/fix_v016.py:8–17  ·  view source on GitHub ↗
(op, num)

Source from the content-addressed store, hash-verified

6
7
8def check_valid(op, num):
9 try:
10 exp = ""
11 for i in range(len(op)):
12 exp += str(num[i]) + str(op[i])
13 exp += str(num[-1])
14 exp = str(eval(exp))
15 except:
16 return False
17 return True
18
19
20def fix(data):

Callers 1

fixFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected