@@ -455,7 +455,7 @@ def create_local_scan_result(
455455 documents_to_scan : List [Document ],
456456 command_scan_type : str ,
457457 scan_type : str ,
458- severity_threshold : Optional [ str ] ,
458+ severity_threshold : str ,
459459) -> LocalScanResult :
460460 document_detections = get_document_detections (scan_result , documents_to_scan )
461461 relevant_document_detections_list = exclude_irrelevant_document_detections (
@@ -630,7 +630,7 @@ def exclude_irrelevant_document_detections(
630630 document_detections_list : List [DocumentDetections ],
631631 scan_type : str ,
632632 command_scan_type : str ,
633- severity_threshold : Optional [ str ] ,
633+ severity_threshold : str ,
634634) -> List [DocumentDetections ]:
635635 relevant_document_detections_list = []
636636 for document_detections in document_detections_list :
@@ -712,15 +712,11 @@ def try_get_git_remote_url(path: str) -> Optional[str]:
712712
713713
714714def exclude_irrelevant_detections (
715- detections : List [Detection ], scan_type : str , command_scan_type : str , severity_threshold : Optional [ str ]
715+ detections : List [Detection ], scan_type : str , command_scan_type : str , severity_threshold : str
716716) -> List [Detection ]:
717717 relevant_detections = _exclude_detections_by_exclusions_configuration (detections , scan_type )
718718 relevant_detections = _exclude_detections_by_scan_type (relevant_detections , scan_type , command_scan_type )
719-
720- if severity_threshold :
721- return _exclude_detections_by_severity (relevant_detections , severity_threshold )
722-
723- return relevant_detections
719+ return _exclude_detections_by_severity (relevant_detections , severity_threshold )
724720
725721
726722def _exclude_detections_by_severity (detections : List [Detection ], severity_threshold : str ) -> List [Detection ]:
0 commit comments