PyCQA / pycodestyle

Simple Python style checker in one Python file

Home Page:https://pycodestyle.pycqa.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Latest version doesn't seem to handle self-documenting f-string syntax added back in 3.8

BrentWilkins opened this issue · comments

I have example.py:

var: int = 5
print(f'{var = }')

I'm running:

✗ flake8 --version
7.0.0 (mccabe: 0.7.0, pycodestyle: 2.11.1, pyflakes: 3.2.0) CPython 3.12.1 on [Darwin | Linux]

I get 3 errors for the valid syntax:

✗ flake8 example.py
example.py:3:13: E251 unexpected spaces around keyword / parameter equals
example.py:3:15: E202 whitespace before '}'
example.py:3:15: E251 unexpected spaces around keyword / parameter equals

please search for duplicates. the error there is intentional