@@ -72,27 +72,7 @@ def search_files(
7272 _is_excluded , filename_exclude_regex , multipart_exclude_regex
7373 )
7474 for dirpath , dirnames , filenames in os .walk (folder_to_search ):
75- logger .debug (
76- "search_files.os_walk" ,
77- extra = dict (
78- extra_log_attributes = dict (
79- folder_to_search = folder_to_search ,
80- dirpath = dirpath ,
81- dirnames = dirnames ,
82- filenames = filenames ,
83- ),
84- ),
85- )
8675 dirs_to_remove = set (d for d in dirnames if d in folders_to_ignore )
87- logger .debug (
88- "search_files.dirs_to_remove" ,
89- extra = dict (
90- extra_log_attributes = dict (
91- dirs_to_remove = dirs_to_remove ,
92- folders_to_ignore = folders_to_ignore ,
93- ),
94- ),
95- )
9676
9777 if multipart_exclude_regex is not None :
9878 dirs_to_remove .union (
@@ -108,16 +88,6 @@ def search_files(
10888 # This is the documented way of doing this on python docs
10989 dirnames .remove (directory )
11090
111- logger .debug (
112- "search_files.post_dir_removal" ,
113- extra = dict (
114- extra_log_attributes = dict (
115- dirnames = dirnames ,
116- search_for_directories = search_for_directories ,
117- ),
118- ),
119- )
120-
12191 if search_for_directories :
12292 for directory in dirnames :
12393 dir_path = pathlib .Path (dirpath ) / directory
@@ -126,18 +96,6 @@ def search_files(
12696 else :
12797 for single_filename in filenames :
12898 file_path = pathlib .Path (dirpath ) / single_filename
129- logger .debug (
130- "search_files.search_for_filenames" ,
131- extra = dict (
132- extra_log_attributes = dict (
133- single_filename = single_filename ,
134- file_path = file_path ,
135- is_excluded = this_is_excluded (file_path ),
136- is_included = this_is_included (file_path ),
137- yield_it = (not this_is_excluded (file_path ) and this_is_included (file_path )),
138- ),
139- ),
140- )
14199 if not this_is_excluded (file_path ) and this_is_included (file_path ):
142100 yield file_path
143101
0 commit comments