Open
Description
Bug description
When assigning to multiple target, and target n
is used in target n+1
, pylint flags the the line as E0601 "used-before-assignment", despite the statement being entirely correct per Python semantics:
# pylint: disable=missing-module-docstring, invalid-name
b = {}
a = b[id(a)] = 0
Even if there's an argument for flagging it (it's not great style), I don't think E0601 is valid.
Configuration
No response
Command used
`pylint <file>.py`
Pylint output
************* Module <file>
<file>.py:3:9: E0601: Using variable 'a' before assignment (used-before-assignment)
-----------------------------------------------------------------------
Your code has been rated at -15.00/10 (previous run: -25.00/10, +10.00)
Expected behavior
That the code passes, possibly triggers some sort of code style warning at most.
Pylint version
pylint 2.12.2
astroid 2.9.0
Python 3.8.12 (default, Sep 27 2021, 09:39:37)
OS / Environment
No response
Additional dependencies
No response