False positive used-before-assignment
on different line returns
#4301
Labels
Assignment expression
Related to the walrus operator / assignment expression
False Positive 🦟
A message is emitted but nothing is wrong with the code
Milestone
This is related to my previous issue #4238 for the support of the walrus operator. Another edge case seems to be unhandled. That of different line returns.
Steps to reproduce
Given a file
good-test.py
:pylint
doesn't detect any errors which is expected. However when return to a line like this:Given a file
bad-test.py
:We obtain the following:
Current behavior
Result of
pylint bad-test.py
:Expected behavior
Normally, this should not raise any errors.
pylint --version output
Result of pylint --version output on my local macOS:
The text was updated successfully, but these errors were encountered: