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(
134134 local_repo , "HEAD" , example ["base_commit" ]
135135 )
136136 # 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 ]
138138 test_files = sorted (list (set ([i .split (":" )[0 ] for i in test_files_str ])))
139139
140140 # prepare the log dir
Original file line number Diff line number Diff line change @@ -96,7 +96,7 @@ def run_agent_for_repo(
9696 local_repo , "HEAD" , example ["base_commit" ]
9797 )
9898 # 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 ]
100100 test_files = sorted (list (set ([i .split (":" )[0 ] for i in test_files_str ])))
101101
102102 # prepare the log dir
Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ def main(
3434 dataset : Iterator [RepoInstance ] = load_dataset (dataset_name , split = dataset_split ) # type: ignore
3535 if "swe" in dataset_name .lower ():
3636 if repo_split == "all" :
37- repos = dataset ["instance_id" ]
37+ repos = dataset ["instance_id" ] # type: ignore
3838 else :
3939 repos = [repo_split ]
4040 else :
Original file line number Diff line number Diff line change 11import bz2
2- from typing import List , Tuple
2+ from typing import List
33import commit0
44import os
55
66
7- def read (bz2_file ) :
7+ def read (bz2_file : str ) -> str :
88 with bz2 .open (bz2_file , "rt" ) as f :
99 out = f .read ()
1010 return out
1111
12- def main (repo : str , verbose : int ) -> Tuple [List [str ], List [str ]]:
12+
13+ def main (repo : str , verbose : int ) -> List [List [str ]]:
1314 repo = repo .lower ()
1415 repo = repo .replace ("." , "-" )
1516 commit0_path = os .path .dirname (commit0 .__file__ )
16- if '__' in repo :
17+ if "__" in repo :
1718 in_file_fail = read (f"{ commit0_path } /data/test_ids/{ repo } #fail_to_pass.bz2" )
1819 in_file_pass = read (f"{ commit0_path } /data/test_ids/{ repo } #pass_to_pass.bz2" )
1920 else :
Original file line number Diff line number Diff line change @@ -116,7 +116,7 @@ def main(
116116 local_repo , example ["base_commit" ], commit_id
117117 )
118118 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" )
120120
121121 # make eval file
122122 if coverage :
You can’t perform that action at this time.
0 commit comments