PyCQA / pycodestyle

Simple Python style checker in one Python file
https://pycodestyle.pycqa.org
Other
5.01k stars 755 forks source link

Spurious E231 for nested format substitutions #1241

Open anntzer opened 3 months ago

anntzer commented 3 months ago

For

x = 1
digits = 1
print(f"{x:0.{digits:d}f}")  # admittedly the :d is not needed in this minimal repro, but still valid.

pycodestyle 2.11.1 spuriously complains about a missing whitespace after the second colon in the f-string:

test.py:3:21: E231 missing whitespace after ':'