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!
Madeleine,
That's an excellent find. The underlying bug is in pycodestyle, though. You can report the issue on github.com/PyCQA/pycodestyle
Cheers,
Sent from my phone with my typo-happy thumbs. Please excuse my brevity
On Feb 13, 2018 15:07, "Madeleine Thompson" madeleineth@gmail.com wrote:
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! _______________________________________________ code-quality mailing list code-quality@python.org https://mail.python.org/mailman/listinfo/code-quality
An issue exists for this:
https://github.com/PyCQA/pycodestyle/issues/678
On Tue, Feb 13, 2018 at 1:12 PM, Ian Stapleton Cordasco < graffatcolmingov@gmail.com> wrote:
Madeleine,
That's an excellent find. The underlying bug is in pycodestyle, though. You can report the issue on github.com/PyCQA/pycodestyle
Cheers,
Sent from my phone with my typo-happy thumbs. Please excuse my brevity
On Feb 13, 2018 15:07, "Madeleine Thompson" madeleineth@gmail.com wrote:
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! _______________________________________________ code-quality mailing list code-quality@python.org https://mail.python.org/mailman/listinfo/code-quality
code-quality mailing list code-quality@python.org https://mail.python.org/mailman/listinfo/code-quality
sorry, that was a bit abrupt:
I do think it is a great find, and there may be more info revealed by your investigation that you could add to the issue. I was hoping to find the time to see if I could find and fix the bug, but that hasn't magically materialized so far. ;)
On Tue, Feb 13, 2018 at 1:22 PM, Eric Casteleijn thisfred@gmail.com wrote:
An issue exists for this:
https://github.com/PyCQA/pycodestyle/issues/678
On Tue, Feb 13, 2018 at 1:12 PM, Ian Stapleton Cordasco < graffatcolmingov@gmail.com> wrote:
Madeleine,
That's an excellent find. The underlying bug is in pycodestyle, though. You can report the issue on github.com/PyCQA/pycodestyle
Cheers,
Sent from my phone with my typo-happy thumbs. Please excuse my brevity
On Feb 13, 2018 15:07, "Madeleine Thompson" madeleineth@gmail.com wrote:
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! _______________________________________________ code-quality mailing list code-quality@python.org https://mail.python.org/mailman/listinfo/code-quality
code-quality mailing list code-quality@python.org https://mail.python.org/mailman/listinfo/code-quality
--
- eric casteleijn