False negative used-before-assignment for self-referencing assignment in if-statement #6643
Labels
C: used-before-assignment
Issues related to 'used-before-assignment' check
False Negative 🦋
No message is emitted but something is wrong with the code
Milestone
Bug description
The following code should trigger a
used-before-assignment
error from pylint, but it does not:When the if-statement is removed like
the error is produced as expected.
Configuration
No response
Command used
Pylint output
Expected behavior
There should be a
used-before-assignment
error.Pylint version
OS / Environment
Python interpreter was built by pyenv, on Ubuntu Linux 20.04
Additional dependencies
No response
The text was updated successfully, but these errors were encountered: