def no_import_translation_in_tests(logical_line, filename):
 if ('nova/tests/' in filename):
  res = import_translation_for_log_or_exception.match(logical_line)
  if res:
   (yield (0, "N337 Don't import translation in tests"))

def no_import_translation_in_tests ( logical_line , filename ) : if ( 'nova/tests/' in filename ) : res = import_translation_for_log_or_exception . match ( logical_line ) if res : ( yield ( 0 , "N337 Don't import translation in tests" ) )
check for from nova .