PyCQA/pycodestyle

Spurious E231 for nested format substitutions

Opened this issue · 0 comments

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 ':'