def collect_files(file_paths, log_printer, ignored_file_paths=None, limit_file_paths=None):
 limit_fnmatch = (functools.partial(fnmatch, globs=limit_file_paths) if limit_file_paths else (lambda fname: True))
 valid_files = list(filter((lambda fname: os.path.isfile(fname[0])), icollect(file_paths, ignored_file_paths)))
 if valid_files:
  (collected_files, file_globs_with_files) = zip(*valid_files)
 else:
  (collected_files, file_globs_with_files) = ([], [])
 _warn_if_unused_glob(log_printer, file_paths, file_globs_with_files, "No files matching '{}' were found.")
 limited_files = list(filter(limit_fnmatch, collected_files))
 return limited_files

def collect_files ( file_paths , log_printer , ignored_file_paths = None , limit_file_paths = None ) : limit_fnmatch = ( functools . partial ( fnmatch , globs = limit_file_paths ) if limit_file_paths else ( lambda fname : True ) ) valid_files = list ( filter ( ( lambda fname : os . path . isfile ( fname [ 0 ] ) ) , icollect ( file_paths , ignored_file_paths ) ) ) if valid_files : ( collected_files , file_globs_with_files ) = zip ( * valid_files ) else : ( collected_files , file_globs_with_files ) = ( [ ] , [ ] ) _warn_if_unused_glob ( log_printer , file_paths , file_globs_with_files , "No files matching '{}' were found." ) limited_files = list ( filter ( limit_fnmatch , collected_files ) ) return limited_files
evaluate globs in file paths and return all matching files .