You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Consider the following code using debug-expressions in f-strings. Here's the PEP that seeks to retroactively codify them and gives some links to their description.
var=123print(f"{var=}")
print(f"{var=}")
It produces the following output:
var=123
var = 123
As one can see, the spaces around the "=" sign are not a code formatting choice, but rather a part of the debug format. Hence, pycodestyle should probably ignore them. However, it currently thinks that it's a formatting error:
mre.py:3:13: E251 unexpected spaces around keyword / parameter equals
mre.py:3:15: E202 whitespace before '}'
mre.py:3:15: E251 unexpected spaces around keyword / parameter equals
I am extensively using these expressions in many projects and having to manually ignore E202 and E251 every time is a bit of a hassle!
The text was updated successfully, but these errors were encountered:
Consider the following code using debug-expressions in f-strings. Here's the PEP that seeks to retroactively codify them and gives some links to their description.
It produces the following output:
As one can see, the spaces around the "=" sign are not a code formatting choice, but rather a part of the debug format. Hence, pycodestyle should probably ignore them. However, it currently thinks that it's a formatting error:
I am extensively using these expressions in many projects and having to manually ignore E202 and E251 every time is a bit of a hassle!
The text was updated successfully, but these errors were encountered: