File tree Expand file tree Collapse file tree 5 files changed +9
-8
lines changed Expand file tree Collapse file tree 5 files changed +9
-8
lines changed Original file line number Diff line number Diff line change @@ -134,7 +134,7 @@ def run_agent_for_repo(
134
134
local_repo , "HEAD" , example ["base_commit" ]
135
135
)
136
136
# Call the commit0 get-tests command to retrieve test files
137
- test_files_str = get_tests (repo_name , verbose = 0 )
137
+ test_files_str = [ xx for x in get_tests (repo_name , verbose = 0 ) for xx in x ]
138
138
test_files = sorted (list (set ([i .split (":" )[0 ] for i in test_files_str ])))
139
139
140
140
# prepare the log dir
Original file line number Diff line number Diff line change @@ -96,7 +96,7 @@ def run_agent_for_repo(
96
96
local_repo , "HEAD" , example ["base_commit" ]
97
97
)
98
98
# Call the commit0 get-tests command to retrieve test files
99
- test_files_str = get_tests (repo_name , verbose = 0 )
99
+ test_files_str = [ xx for x in get_tests (repo_name , verbose = 0 ) for xx in x ]
100
100
test_files = sorted (list (set ([i .split (":" )[0 ] for i in test_files_str ])))
101
101
102
102
# prepare the log dir
Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ def main(
34
34
dataset : Iterator [RepoInstance ] = load_dataset (dataset_name , split = dataset_split ) # type: ignore
35
35
if "swe" in dataset_name .lower ():
36
36
if repo_split == "all" :
37
- repos = dataset ["instance_id" ]
37
+ repos = dataset ["instance_id" ] # type: ignore
38
38
else :
39
39
repos = [repo_split ]
40
40
else :
Original file line number Diff line number Diff line change 1
1
import bz2
2
- from typing import List , Tuple
2
+ from typing import List
3
3
import commit0
4
4
import os
5
5
6
6
7
- def read (bz2_file ) :
7
+ def read (bz2_file : str ) -> str :
8
8
with bz2 .open (bz2_file , "rt" ) as f :
9
9
out = f .read ()
10
10
return out
11
11
12
- def main (repo : str , verbose : int ) -> Tuple [List [str ], List [str ]]:
12
+
13
+ def main (repo : str , verbose : int ) -> List [List [str ]]:
13
14
repo = repo .lower ()
14
15
repo = repo .replace ("." , "-" )
15
16
commit0_path = os .path .dirname (commit0 .__file__ )
16
- if '__' in repo :
17
+ if "__" in repo :
17
18
in_file_fail = read (f"{ commit0_path } /data/test_ids/{ repo } #fail_to_pass.bz2" )
18
19
in_file_pass = read (f"{ commit0_path } /data/test_ids/{ repo } #pass_to_pass.bz2" )
19
20
else :
Original file line number Diff line number Diff line change @@ -116,7 +116,7 @@ def main(
116
116
local_repo , example ["base_commit" ], commit_id
117
117
)
118
118
patch_file = Path (log_dir / "patch.diff" )
119
- patch_file .write_text (patch , encoding = ' utf-8' , errors = ' ignore' )
119
+ patch_file .write_text (patch , encoding = " utf-8" , errors = " ignore" )
120
120
121
121
# make eval file
122
122
if coverage :
You can’t perform that action at this time.
0 commit comments