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

E226: unable to detect missing whitespace in f-string

yuxCai opened this issue · comments

pycodestyle version: 2.12.0

In the following example

num_packets_per_sec = 10
num_packets_in_one_min = num_packets_per_sec*60
print(f"Number of packets in one minute: {num_packets_per_sec*60}")

pycodestyle returns E226 missing whitespace around arithmetic operator on the second line, but not the third line. Has this been reported before?

you need to use 3.12+ for tokenization inside fstring

please search there are several duplicates