Comment 0 for bug 2002855

Revision history for this message
Chris Johnston (cjohnston) wrote :

Create a simple test.py:

def f(x):
    if (y := x.upper()) :
        print()

Run `flake8 test.py`

Result:

"pyflakes" failed during execution due to "'FlakesChecker' object has no attribute 'NAMEDEXPR'"
Run flake8 with greater verbosity to see more details
test.py:2:10: E203 whitespace before ':'
test.py:2:11: E231 missing whitespace after ':'
test.py:2:24: E203 whitespace before ':'

Support has been added upstream [1] to support PEP572 expressions, and it would be great to get this into the Ubuntu packages.

Release: Focal
ii flake8 3.7.9-2 all code checker using pycodestyle and pyflakes
ii pyflakes 2.1.1-2ubuntu1 all passive checker of Python 2 programs
ii pyflakes3 2.1.1-2 all passive checker of Python 3 programs
ii python-pyflakes 2.1.1-2ubuntu1 all passive checker of Python 2 programs - Python modules
ii python3-flake8 3.7.9-2 all code checker using pycodestyle and pyflakes - Python 3.x
ii python3-pyflakes 2.1.1-2 all passive checker of Python 3 programs - Python modules

[1] https://github.com/PyCQA/pyflakes/pull/457/files