File tree 1 file changed +29
-3
lines changed
1 file changed +29
-3
lines changed Original file line number Diff line number Diff line change @@ -163,12 +163,38 @@ def find(
163
163
if isinstance (rootdir , Path ):
164
164
rootdir = str (rootdir )
165
165
166
- # Build a tree for each unique file for all platforms.
167
- state = ParserState (summarize_only )
168
- filenames = set (codebase )
166
+ # Build up a list of potential source files.
167
+ def _potential_file_generator (codebase ):
168
+ for directory in codebase ._directories :
169
+ yield from Path (directory ).rglob ("*" )
170
+
171
+ potential_files = []
172
+ for f in tqdm (
173
+ _potential_file_generator (codebase ),
174
+ desc = "Scanning current directory" ,
175
+ unit = " files" ,
176
+ leave = False ,
177
+ disable = not show_progress ,
178
+ ):
179
+ potential_files .append (f )
180
+
181
+ # Identify which files are in the code base.
182
+ filenames = set ()
183
+ for f in tqdm (
184
+ potential_files ,
185
+ desc = "Identifying source files" ,
186
+ unit = " files" ,
187
+ leave = False ,
188
+ disable = not show_progress ,
189
+ ):
190
+ if f in codebase :
191
+ filenames .add (f )
169
192
for p in configuration :
170
193
for e in configuration [p ]:
171
194
filenames .add (e ["file" ])
195
+
196
+ # Build a tree for each unique file for all platforms.
197
+ state = ParserState (summarize_only )
172
198
for f in tqdm (
173
199
filenames ,
174
200
desc = "Parsing" ,
You can’t perform that action at this time.
0 commit comments