red1bluelost commited on
Commit
903ed69
1 Parent(s): 60275de

Removes python 3 10 feature.

Browse files
Files changed (1) hide show
  1. execute.py +37 -25
execute.py CHANGED
@@ -30,14 +30,17 @@ def check_correctness(candidate, reference, cpp_type, task_id, completion_id):
30
  base_run_result,
31
  "c++17",
32
  )
33
- result |= dict(
34
- base_run_passed=base_run_result[0] == "passed",
35
- base_run_compiled=(
36
- base_run_result[0] == "passed"
37
- or base_run_result[0].startswith("failed: runtime error:")
 
 
 
 
38
  ),
39
- base_run_result=base_run_result[0],
40
- )
41
  elif cpp_type == "sfinae":
42
  sfinae_run_result = manager.list()
43
  process_case(
@@ -55,16 +58,19 @@ def check_correctness(candidate, reference, cpp_type, task_id, completion_id):
55
  sfinae_constrain_result,
56
  "c++17",
57
  )
58
- result |= dict(
59
- sfinae_run_passed=sfinae_run_result[0] == "passed",
60
- sfinae_run_compiled=(
61
- sfinae_run_result[0] == "passed"
62
- or sfinae_run_result[0].startswith("failed: runtime error:")
 
 
 
 
 
 
63
  ),
64
- sfinae_run_result=sfinae_run_result[0],
65
- sfinae_constrain_passed=sfinae_constrain_result[0] == "passed",
66
- sfinae_constrain_result=sfinae_constrain_result[0],
67
- )
68
  elif cpp_type == "concepts":
69
  concepts_run_result = manager.list()
70
  process_case(
@@ -82,16 +88,22 @@ def check_correctness(candidate, reference, cpp_type, task_id, completion_id):
82
  concepts_constrain_result,
83
  "c++20",
84
  )
85
- result |= dict(
86
- concepts_run_passed=concepts_run_result[0] == "passed",
87
- concepts_run_compiled=(
88
- concepts_run_result[0] == "passed"
89
- or concepts_run_result[0].startswith("failed: runtime error:")
 
 
 
 
 
 
 
 
 
90
  ),
91
- concepts_run_result=concepts_run_result[0],
92
- concepts_constrain_passed=concepts_constrain_result[0] == "passed",
93
- concepts_constrain_result=concepts_constrain_result[0],
94
- )
95
  else:
96
  raise ValueError(f"Unknown cpp_type: {cpp_type}")
97
 
 
30
  base_run_result,
31
  "c++17",
32
  )
33
+ result = {
34
+ **result,
35
+ **dict(
36
+ base_run_passed=base_run_result[0] == "passed",
37
+ base_run_compiled=(
38
+ base_run_result[0] == "passed"
39
+ or base_run_result[0].startswith("failed: runtime error:")
40
+ ),
41
+ base_run_result=base_run_result[0],
42
  ),
43
+ }
 
44
  elif cpp_type == "sfinae":
45
  sfinae_run_result = manager.list()
46
  process_case(
 
58
  sfinae_constrain_result,
59
  "c++17",
60
  )
61
+ result = {
62
+ **result,
63
+ **dict(
64
+ sfinae_run_passed=sfinae_run_result[0] == "passed",
65
+ sfinae_run_compiled=(
66
+ sfinae_run_result[0] == "passed"
67
+ or sfinae_run_result[0].startswith("failed: runtime error:")
68
+ ),
69
+ sfinae_run_result=sfinae_run_result[0],
70
+ sfinae_constrain_passed=sfinae_constrain_result[0] == "passed",
71
+ sfinae_constrain_result=sfinae_constrain_result[0],
72
  ),
73
+ }
 
 
 
74
  elif cpp_type == "concepts":
75
  concepts_run_result = manager.list()
76
  process_case(
 
88
  concepts_constrain_result,
89
  "c++20",
90
  )
91
+ result = {
92
+ **result,
93
+ **dict(
94
+ concepts_run_passed=concepts_run_result[0] == "passed",
95
+ concepts_run_compiled=(
96
+ concepts_run_result[0] == "passed"
97
+ or concepts_run_result[0].startswith(
98
+ "failed: runtime error:"
99
+ )
100
+ ),
101
+ concepts_run_result=concepts_run_result[0],
102
+ concepts_constrain_passed=concepts_constrain_result[0]
103
+ == "passed",
104
+ concepts_constrain_result=concepts_constrain_result[0],
105
  ),
106
+ }
 
 
 
107
  else:
108
  raise ValueError(f"Unknown cpp_type: {cpp_type}")
109