def _lint_py_files(config_pylint, files_to_lint, result):
 start_time = time.time()
 are_there_errors = False
 num_py_files = len(files_to_lint)
 if (not files_to_lint):
  result.put('')
  print 'There are no Python files to lint.'
  return
 print ('Linting %s Python files' % num_py_files)
 _BATCH_SIZE = 50
 current_batch_start_index = 0
 while (current_batch_start_index < len(files_to_lint)):
  current_batch_end_index = min((current_batch_start_index + _BATCH_SIZE), len(files_to_lint))
  current_files_to_lint = files_to_lint[current_batch_start_index:current_batch_end_index]
  print ('Linting Python files %s to %s...' % ((current_batch_start_index + 1), current_batch_end_index))
  try:
   lint.Run((current_files_to_lint + [config_pylint]))
  except SystemExit as e:
   if (str(e) != '0'):
    are_there_errors = True
  current_batch_start_index = current_batch_end_index
 if are_there_errors:
  result.put(('%s    Python linting failed' % _MESSAGE_TYPE_FAILED))
 else:
  result.put(('%s   %s Python files linted (%.1f secs)' % (_MESSAGE_TYPE_SUCCESS, num_py_files, (time.time() - start_time))))
 print 'Python linting finished.'

def _lint_py_files ( config_pylint , files_to_lint , result ) : start_time = time . time ( ) are_there_errors = False num_py_files = len ( files_to_lint ) if ( not files_to_lint ) : result . put ( '' ) print 'There are no Python files to lint.' return print ( 'Linting %s Python files' % num_py_files ) _BATCH_SIZE = 50 current_batch_start_index = 0 while ( current_batch_start_index < len ( files_to_lint ) ) : current_batch_end_index = min ( ( current_batch_start_index + _BATCH_SIZE ) , len ( files_to_lint ) ) current_files_to_lint = files_to_lint [ current_batch_start_index : current_batch_end_index ] print ( 'Linting Python files %s to %s...' % ( ( current_batch_start_index + 1 ) , current_batch_end_index ) ) try : lint . Run ( ( current_files_to_lint + [ config_pylint ] ) ) except SystemExit as e : if ( str ( e ) != '0' ) : are_there_errors = True current_batch_start_index = current_batch_end_index if are_there_errors : result . put ( ( '%s    Python linting failed' % _MESSAGE_TYPE_FAILED ) ) else : result . put ( ( '%s   %s Python files linted (%.1f secs)' % ( _MESSAGE_TYPE_SUCCESS , num_py_files , ( time . time ( ) - start_time ) ) ) ) print 'Python linting finished.'
prints a list of lint errors in the given list of python files .