False positive superfluous-parens
with walrus operator
#4346
Labels
Assignment expression
Related to the walrus operator / assignment expression
False Positive 🦟
A message is emitted but nothing is wrong with the code
Milestone
I've came across a
superfluous-parens
false positive when using the walrus operator:Steps to reproduce
Given a file
test.py
:We obtain the following:
Current behavior
Result of
pylint test.py
:Expected behavior
Normally, this should not raise any errors as the use of parentheses here is relevant. Because, otherwise the value of
var
will be the inclusion boolean instead of the value itself.pylint --version output
Result of pylint --version output on my local macOS:
The text was updated successfully, but these errors were encountered: