def check_doubled_words(physical_line, filename):
 msg = "N343: Doubled word '%(word)s' typo found"
 match = re.search(doubled_words_re, physical_line)
 if match:
  return (0, (msg % {'word': match.group(1)}))

def check_doubled_words ( physical_line , filename ) : msg = "N343: Doubled word '%(word)s' typo found" match = re . search ( doubled_words_re , physical_line ) if match : return ( 0 , ( msg % { 'word' : match . group ( 1 ) } ) )
check for the common doubled-word typos n343 .