def missing_whitespace(logical_line):
    line = logical_line
    for index in range(len(line) - 1):
        char = line[index]
        if char in ',;:' and line[index + 1] != ' ':
            before = line[:index]
            if char == ':' and before.count('[') > before.count(']'):
                continue # Slice syntax, no space required
            return index, "E231 missing whitespace after '%s'" % char
JCR: Each comma, semicolon or colon should be followed by whitespace.
dataset/ETHPy150Open sahana/eden/static/scripts/tools/pep8.py/missing_whitespace