False positive used-before-assignmnet
for assignment expressions in class initialisers
#5212
Labels
Assignment expression
Related to the walrus operator / assignment expression
C: used-before-assignment
Issues related to 'used-before-assignment' check
False Positive 🦟
A message is emitted but nothing is wrong with the code
python 3.8
Bug description
Same with classes and dataclasses:
raises
used-before-assigment
, whiledoesn't. Excepting behaviour - no errors.
Originally posted by @egormm in #3688 (comment)
Configuration
No response
Command used
Pylint output
Expected behavior
No
used-before-assignment
errors for the first example.Pylint version
OS / Environment
No response
Additional dependencies
No response
The text was updated successfully, but these errors were encountered: