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

pycodestyle and python 3.12 beta: warning E231 about f-string

hannob opened this issue · comments

There appears to be a problem with f-strings and pycodestyle running on python 3.12 beta versions.

Simple example:

def testfunc(a):
    url = f"{a}:123"

pycodestyle running on python 3.12.0b2 (test with docker run --rm -ti python:3.12-rc /bin/bash) will give the following warning:

test.py:2:16: E231 missing whitespace after ':'

It looks like pycodestyle tries to interpret the content inside the f string as if it was python code (where space after : would apply). Obviously that's not how this should work.

already fixed, search the issue tracker next time