[code-quality] E122 continuation line missing indentation or outdented

Madeleine Thompson madeleineth at gmail.com
Tue Feb 13 14:55:15 EST 2018


I have what I think may be a bug in flake8. Consider this source file, test.py:

open({
    'a':
        len([1, 2, 3]),
    'b': [
        'c'
    ]
})

open({
    'a':
        False,
    'b': [
        'c'
    ]
})

Notice that the two blocks only differ in the call to "len." If I run
flake8 on it:

$ flake8 test.py
test.py:6:5: E122 continuation line missing indentation or outdented

It passes without errors if I move the "]" on line 6 to under the
open-quote in 'c'.

I believe this file should pass flake8 without errors. But, if it
doesn't, it should have two errors, not one.

Version information:

$ python -V
Python 3.5.2
$ flake8 --version
3.5.0 (mccabe: 0.6.1, pycodestyle: 2.3.1, pyflakes: 1.6.0) CPython
3.5.2 on Linux

Also replicated on a fresh Docker container based on ubuntu:bionic
with Python 3.6.4 (nothing installed but the base image, python3,
python3-pip, and the pypi version of flake8).

Thanks!


More information about the code-quality mailing list