f-string varialbes shows wrong E251 and E202 since python 3.12 upgrade
gituser789 opened this issue · comments
gituser789 commented
Since upgrading to python 3.12
, there are new hints, which have not been there using pycodestyle together with python 3.11
:
print(f"{my_variable = }")
raises
E251 unexpected spaces around keyword / parameter equals
E202 whitespace before '}'
As it makes a difference in displaying, for different formats, there are different display outputs with/without spaces
print(f"{my_variable = }")
-> my_variable = 5
print(f"{my_variable=}")
-> my_variable=5
In the f-string case, the spaces are wanted.
When ignoring E251 and E202, the hints are missing in real functions if the space is missing.
Anthony Sottile commented
please search for duplicates
gituser789 commented