def ParseNolintSuppressions(filename, raw_line, linenum, error):
 matched = Search('\\bNOLINT(NEXTLINE)?\\b(\\([^)]+\\))?', raw_line)
 if matched:
  if matched.group(1):
   suppressed_line = (linenum + 1)
  else:
   suppressed_line = linenum
  category = matched.group(2)
  if (category in (None, '(*)')):
   _error_suppressions.setdefault(None, set()).add(suppressed_line)
  elif (category.startswith('(') and category.endswith(')')):
   category = category[1:(-1)]
   if (category in _ERROR_CATEGORIES):
    _error_suppressions.setdefault(category, set()).add(suppressed_line)
   elif (category not in _LEGACY_ERROR_CATEGORIES):
    error(filename, linenum, 'readability/nolint', 5, ('Unknown NOLINT error category: %s' % category))

def ParseNolintSuppressions ( filename , raw_line , linenum , error ) : matched = Search ( '\\bNOLINT(NEXTLINE)?\\b(\\([^)]+\\))?' , raw_line ) if matched : if matched . group ( 1 ) : suppressed_line = ( linenum + 1 ) else : suppressed_line = linenum category = matched . group ( 2 ) if ( category in ( None , '(*)' ) ) : _error_suppressions . setdefault ( None , set ( ) ) . add ( suppressed_line ) elif ( category . startswith ( '(' ) and category . endswith ( ')' ) ) : category = category [ 1 : ( - 1 ) ] if ( category in _ERROR_CATEGORIES ) : _error_suppressions . setdefault ( category , set ( ) ) . add ( suppressed_line ) elif ( category not in _LEGACY_ERROR_CATEGORIES ) : error ( filename , linenum , 'readability/nolint' , 5 , ( 'Unknown NOLINT error category: %s' % category ) )
updates the global list of line error-suppressions .