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

Spurious E231 for nested format substitutions #1241

Open
anntzer opened this issue Apr 25, 2024 · 0 comments
Open

Spurious E231 for nested format substitutions #1241

anntzer opened this issue Apr 25, 2024 · 0 comments

Comments

@anntzer
Copy link
Contributor

anntzer commented Apr 25, 2024

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

1 participant