Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

E226: unable to detect missing whitespace in f-string #1248

Closed
yuxCai opened this issue Jun 17, 2024 · 1 comment
Closed

E226: unable to detect missing whitespace in f-string #1248

yuxCai opened this issue Jun 17, 2024 · 1 comment

Comments

@yuxCai
Copy link

yuxCai commented Jun 17, 2024

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?

@asottile
Copy link
Member

you need to use 3.12+ for tokenization inside fstring

please search there are several duplicates

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants