def FormatFiles(filenames, lines, style_config=None, no_local_style=False, in_place=False, print_diff=False, verify=True, parallel=False):
 changed = False
 if parallel:
  import multiprocessing
  import concurrent.futures
  workers = min(multiprocessing.cpu_count(), len(filenames))
  with concurrent.futures.ProcessPoolExecutor(workers) as executor:
   future_formats = [executor.submit(_FormatFile, filename, lines, style_config, no_local_style, in_place, print_diff, verify) for filename in filenames]
   for future in concurrent.futures.as_completed(future_formats):
    changed |= future.result()
 else:
  for filename in filenames:
   changed |= _FormatFile(filename, lines, style_config, no_local_style, in_place, print_diff, verify)
 return changed

def FormatFiles ( filenames , lines , style_config = None , no_local_style = False , in_place = False , print_diff = False , verify = True , parallel = False ) : changed = False if parallel : import multiprocessing import concurrent . futures workers = min ( multiprocessing . cpu_count ( ) , len ( filenames ) ) with concurrent . futures . ProcessPoolExecutor ( workers ) as executor : future_formats = [ executor . submit ( _FormatFile , filename , lines , style_config , no_local_style , in_place , print_diff , verify ) for filename in filenames ] for future in concurrent . futures . as_completed ( future_formats ) : changed |= future . result ( ) else : for filename in filenames : changed |= _FormatFile ( filename , lines , style_config , no_local_style , in_place , print_diff , verify ) return changed
format a list of files .