def whitespace_before_parameters(logical_line, tokens):
prev_type, prev_text, __, prev_end, __ = tokens[<NUM_LIT:0>]<EOL>for index in range(<NUM_LIT:1>, len(tokens)):<EOL><INDENT>token_type, text, start, end, __ = tokens[index]<EOL>if (token_type == tokenize.OP and<EOL>text in '<STR_LIT>' and<EOL>start != prev_end and<EOL>(prev_type == tokenize.NAME or prev_text in '<STR_LIT>') and<EOL>(index < <NUM_LIT:2> or tokens[index - <NUM_LIT:2>][<NUM_LIT:1>] != '<STR_LIT:class>') and<EOL>not keyword.iskeyword(prev_text)):<EOL><INDENT>yield prev_end, "<STR_LIT>" % text<EOL><DEDENT>prev_type = token_type<EOL>prev_text = text<EOL>prev_end = end<EOL><DEDENT>
r"""Avoid extraneous whitespace.

    Avoid extraneous whitespace in the following situations:
    - before the open parenthesis that starts the argument list of a
      function call.
    - before the open parenthesis that starts an indexing or slicing.

    Okay: spam(1)
    E211: spam (1)

    Okay: dict['key'] = list[index]
    E211: dict ['key'] = list[index]
    E211: dict['key'] = list [index]