def _lint(file_or_dir, template_linters, options, summary_results, out):
 if ((file_or_dir is not None) and os.path.isfile(file_or_dir)):
  _process_file(file_or_dir, template_linters, options, summary_results, out)
 else:
  directory = '.'
  if (file_or_dir is not None):
   if os.path.exists(file_or_dir):
    directory = file_or_dir
   else:
    raise ValueError('Path [{}] is not a valid file or directory.'.format(file_or_dir))
  _process_os_dirs(directory, template_linters, options, summary_results, out)
 summary_results.print_results(options, out)

def _lint ( file_or_dir , template_linters , options , summary_results , out ) : if ( ( file_or_dir is not None ) and os . path . isfile ( file_or_dir ) ) : _process_file ( file_or_dir , template_linters , options , summary_results , out ) else : directory = '.' if ( file_or_dir is not None ) : if os . path . exists ( file_or_dir ) : directory = file_or_dir else : raise ValueError ( 'Path [{}] is not a valid file or directory.' . format ( file_or_dir ) ) _process_os_dirs ( directory , template_linters , options , summary_results , out ) summary_results . print_results ( options , out )
for each linter .