@@ -230,7 +230,8 @@ def _link_objs(value):
230230
231231 # Strip off the extra "\ "
232232 return result [:- 2 ]
233-
233+
234+
234235def _path_matches_patterns (path , patterns ):
235236 """Check if a path matches one of multiple patterns
236237
@@ -325,22 +326,21 @@ def find_files(patterns, dirs, ignore):
325326 for _dir in dirs : # iterate autoapi_dirs
326327 for root , subdirectories , filenames in os .walk (_dir ):
327328 # skip directories if needed
328- for sub_dir in subdirectories .copy ():
329+ for sub_dir in subdirectories .copy ():
329330 # iterate copy as we adapt subdirectories during loop
330- if _path_matches_patterns (os .path .join (root , sub_dir ), ignore ) == True :
331+ if _path_matches_patterns (os .path .join (root , sub_dir ), ignore ):
331332 LOGGER .info (
332333 colorize ("bold" , "[AutoAPI] " )
333334 + colorize (
334- "darkgreen" , f"Ignoring directory: { root } /{ sub_dir } /" )
335+ "darkgreen" , f"Ignoring directory: { root } /{ sub_dir } /"
336+ )
335337 )
336338 # adapt original subdirectories inplace
337339 subdirectories .remove (sub_dir )
338340 # recurse into remaining directories
339341 seen = set ()
340342 for pattern , pattern_re in pattern_regexes :
341343 for filename in fnmatch .filter (filenames , pattern ):
342- skip_file = False
343-
344344 match = re .match (pattern_re , filename )
345345 norm_name = match .groups ()
346346 if norm_name in seen :
@@ -351,7 +351,8 @@ def find_files(patterns, dirs, ignore):
351351 LOGGER .info (
352352 colorize ("bold" , "[AutoAPI] " )
353353 + colorize (
354- "darkgreen" , f"Ignoring file: { root } /{ filename } " )
354+ "darkgreen" , f"Ignoring file: { root } /{ filename } "
355+ )
355356 )
356357 continue
357358
0 commit comments