1313 from cycode .cli .utils .progress_bar import BaseProgressBar , ProgressBarSection
1414 from cycode .cyclient import models
1515
16-
1716logger = get_logger ('File Excluder' )
1817
1918
2019def _is_subpath_of_cycode_configuration_folder (filename : str ) -> bool :
2120 return (
22- is_sub_path (configuration_manager .global_config_file_manager .get_config_directory_path (), filename )
23- or is_sub_path (configuration_manager .local_config_file_manager .get_config_directory_path (), filename )
24- or filename .endswith (ConfigFileManager .get_config_file_route ())
21+ is_sub_path (configuration_manager .global_config_file_manager .get_config_directory_path (), filename )
22+ or is_sub_path (configuration_manager .local_config_file_manager .get_config_directory_path (), filename )
23+ or filename .endswith (ConfigFileManager .get_config_file_route ())
2524 )
2625
2726
@@ -112,6 +111,7 @@ def _is_relevant_file_to_scan_common(self, scan_type: str, filename: str) -> boo
112111 # We don't want to check for IAC scans, the extensions is handled internally
113112 def _should_check_if_extensions_are_supported (self , scan_type : str , filename : str ):
114113 return scan_type != consts .IAC_SCAN_TYPE and not self ._is_file_extension_supported (scan_type , filename )
114+
115115 def _is_relevant_file_to_scan (self , scan_type : str , filename : str ) -> bool :
116116 if not self ._is_relevant_file_to_scan_common (scan_type , filename ):
117117 return False
@@ -155,11 +155,11 @@ def _is_relevant_document_to_scan(self, scan_type: str, filename: str, content:
155155 return True
156156
157157 def exclude_irrelevant_files (
158- self ,
159- progress_bar : 'BaseProgressBar' ,
160- progress_bar_section : 'ProgressBarSection' ,
161- scan_type : str ,
162- filenames : list [str ],
158+ self ,
159+ progress_bar : 'BaseProgressBar' ,
160+ progress_bar_section : 'ProgressBarSection' ,
161+ scan_type : str ,
162+ filenames : list [str ],
163163 ) -> list [str ]:
164164 relevant_files = []
165165 for filename in filenames :
@@ -172,7 +172,7 @@ def exclude_irrelevant_files(
172172 return relevant_files
173173
174174 def exclude_irrelevant_documents_to_scan (
175- self , scan_type : str , documents_to_scan : list ['Document' ]
175+ self , scan_type : str , documents_to_scan : list ['Document' ]
176176 ) -> list ['Document' ]:
177177 logger .debug ('Excluding irrelevant documents to scan' )
178178
0 commit comments