@@ -1069,7 +1069,11 @@ def _backfill_labeled_pr(
10691069 from .github import fetch_pr_metadata
10701070
10711071 meta = fetch_pr_metadata (
1072- owner , repo , pr , token = github_token , timeout = timeout ,
1072+ owner ,
1073+ repo ,
1074+ pr ,
1075+ token = github_token ,
1076+ timeout = timeout ,
10731077 check_rate_limit_first = False ,
10741078 )
10751079 author = (meta .get ("user" ) or {}).get ("login" , "" )
@@ -1084,10 +1088,17 @@ def _backfill_labeled_pr(
10841088 team = get_team_for_developer (author )
10851089
10861090 csv_writer .add_row (
1087- pr_url , complexity , "" , author ,
1088- developer = author , date = date , team = team ,
1089- merged_at = merged_at , created_at = created_at ,
1090- lines_added = lines_added , lines_deleted = lines_deleted ,
1091+ pr_url ,
1092+ complexity ,
1093+ "" ,
1094+ author ,
1095+ developer = author ,
1096+ date = date ,
1097+ team = team ,
1098+ merged_at = merged_at ,
1099+ created_at = created_at ,
1100+ lines_added = lines_added ,
1101+ lines_deleted = lines_deleted ,
10911102 source = pr_provider ,
10921103 )
10931104 typer .echo (f" Backfilled { pr_url } : complexity={ complexity } , author={ author } " , err = True )
@@ -1161,8 +1172,12 @@ def run_batch_analysis_with_labels(
11611172 if existing_score is not None :
11621173 if pr_url not in completed_in_csv and csv_writer_for_backfill :
11631174 _backfill_labeled_pr (
1164- pr_url , existing_score , csv_writer_for_backfill ,
1165- github_token , timeout , pr_provider ,
1175+ pr_url ,
1176+ existing_score ,
1177+ csv_writer_for_backfill ,
1178+ github_token ,
1179+ timeout ,
1180+ pr_provider ,
11661181 )
11671182 completed_in_csv .add (pr_url )
11681183 backfilled += 1
@@ -1178,12 +1193,16 @@ def run_batch_analysis_with_labels(
11781193 if existing_label :
11791194 if pr_url not in completed_in_csv and csv_writer_for_backfill :
11801195 try :
1181- score = int (existing_label [len (label_prefix ):].strip ())
1196+ score = int (existing_label [len (label_prefix ) :].strip ())
11821197 except (ValueError , IndexError ):
11831198 score = 0
11841199 _backfill_labeled_pr (
1185- pr_url , score , csv_writer_for_backfill ,
1186- github_token , timeout , pr_provider ,
1200+ pr_url ,
1201+ score ,
1202+ csv_writer_for_backfill ,
1203+ github_token ,
1204+ timeout ,
1205+ pr_provider ,
11871206 )
11881207 completed_in_csv .add (pr_url )
11891208 backfilled += 1
0 commit comments