Ensure that FalsyConstantCompareViolation
counts NamedExpr
#1201
Labels
feature
New feature or request
help wanted
Extra attention is needed
level:starter
Good for newcomers
pr-merged
Milestone
Currently we don't handle
NamedExpr
in this violation.One can write this code:
And it won't be handled properly. Here's how direct values are compared:
File to fix:
wemake-python-styleguide/wemake_python_styleguide/visitors/ast/compares.py
Line 151 in ea20c44
We also need to test this violation. Make sure that you use
pytest.skipif(PY38, ...)
because this syntax is only valid starting frompython3.8+
Related #1137
The text was updated successfully, but these errors were encountered: