def whitespace_before_parameters(logical_line, tokens):
 (prev_type, prev_text, __, prev_end, __) = tokens[0]
 for index in range(1, len(tokens)):
  (token_type, text, start, end, __) = tokens[index]
  if ((token_type == tokenize.OP) and (text in '([') and (start != prev_end) and ((prev_type == tokenize.NAME) or (prev_text in '}])')) and ((index < 2) or (tokens[(index - 2)][1] != 'class')) and (not keyword.iskeyword(prev_text))):
   (yield (prev_end, ("E211 whitespace before '%s'" % text)))
  prev_type = token_type
  prev_text = text
  prev_end = end

def whitespace_before_parameters ( logical_line , tokens ) : ( prev_type , prev_text , __ , prev_end , __ ) = tokens [ 0 ] for index in range ( 1 , len ( tokens ) ) : ( token_type , text , start , end , __ ) = tokens [ index ] if ( ( token_type == tokenize . OP ) and ( text in '([' ) and ( start != prev_end ) and ( ( prev_type == tokenize . NAME ) or ( prev_text in '}])' ) ) and ( ( index < 2 ) or ( tokens [ ( index - 2 ) ] [ 1 ] != 'class' ) ) and ( not keyword . iskeyword ( prev_text ) ) ) : ( yield ( prev_end , ( "E211 whitespace before '%s'" % text ) ) ) prev_type = token_type prev_text = text prev_end = end
avoid extraneous whitespace in the following situations: - immediately before the open parenthesis that starts the argument list of a function call .