@@ -153,7 +153,7 @@ def _enrich_scan_result_with_data_from_detection_rules(
153153
154154
155155def _get_scan_documents_thread_func (
156- ctx : typer .Context , is_git_diff : bool , is_commit_range : bool , scan_parameters : dict
156+ ctx : typer .Context , is_git_diff : bool , is_commit_range : bool , scan_parameters : dict
157157) -> Callable [[List [Document ]], Tuple [str , CliError , LocalScanResult ]]:
158158 cycode_client = ctx .obj ['client' ]
159159 scan_type = ctx .obj ['scan_type' ]
@@ -288,9 +288,7 @@ def scan_commit_range(
288288 logger .debug ('List of commit ids to scan, %s' , {'commit_ids' : commit_ids_to_scan })
289289 logger .debug ('Starting to scan commit range (it may take a few minutes)' )
290290
291- scan_documents (
292- ctx , documents_to_scan , get_scan_parameters (context , (path ,)), is_git_diff = True , is_commit_range = True
293- )
291+ scan_documents (ctx , documents_to_scan , get_scan_parameters (ctx , (path ,)), is_git_diff = True , is_commit_range = True )
294292 return None
295293
296294
@@ -315,15 +313,13 @@ def scan_documents(
315313 )
316314 return
317315
318- scan_batch_thread_func = _get_scan_documents_thread_func (context , is_git_diff , is_commit_range , scan_parameters )
316+ scan_batch_thread_func = _get_scan_documents_thread_func (ctx , is_git_diff , is_commit_range , scan_parameters )
319317 errors , local_scan_results = run_parallel_batched_scan (
320318 scan_batch_thread_func , scan_type , documents_to_scan , progress_bar = progress_bar
321319 )
322320
323- aggregation_report_url = _try_get_aggregation_report_url_if_needed (
324- scan_parameters , context .obj ['client' ], scan_type
325- )
326- _set_aggregation_report_url (context , aggregation_report_url )
321+ aggregation_report_url = _try_get_aggregation_report_url_if_needed (scan_parameters , ctx .obj ['client' ], scan_type )
322+ _set_aggregation_report_url (ctx , aggregation_report_url )
327323
328324 progress_bar .set_section_length (ScanProgressBarSection .GENERATE_REPORT , 1 )
329325 progress_bar .update (ScanProgressBarSection .GENERATE_REPORT )
@@ -920,8 +916,8 @@ def _try_get_report_url_if_needed(
920916 logger .debug ('Failed to get report URL' , exc_info = e )
921917
922918
923- def _set_aggregation_report_url (context : click .Context , aggregation_report_url : Optional [str ] = None ) -> None :
924- context .obj ['aggregation_report_url' ] = aggregation_report_url
919+ def _set_aggregation_report_url (ctx : click .Context , aggregation_report_url : Optional [str ] = None ) -> None :
920+ ctx .obj ['aggregation_report_url' ] = aggregation_report_url
925921
926922
927923def _try_get_aggregation_report_url_if_needed (
0 commit comments