-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Closed
Labels
Assignment expressionRelated to the walrus operator / assignment expressionRelated to the walrus operator / assignment expressionC: used-before-assignmentIssues related to 'used-before-assignment' checkIssues related to 'used-before-assignment' checkFalse Positive 🦟A message is emitted but nothing is wrong with the codeA message is emitted but nothing is wrong with the codepython 3.8
Milestone
Description
Bug description
def func(): ...
y = {
0: x if (x := func()) else "",
}
Configuration
No response
Command used
pylint test.py
Pylint output
test.py:3:7: E0601: Using variable 'x' before assignment (used-before-assignment)
Expected behavior
No error
Pylint version
pylint 2.16.0b1
astroid 2.14.0-dev0
Python 3.11.1
OS / Environment
No response
Additional dependencies
No response
Metadata
Metadata
Assignees
Labels
Assignment expressionRelated to the walrus operator / assignment expressionRelated to the walrus operator / assignment expressionC: used-before-assignmentIssues related to 'used-before-assignment' checkIssues related to 'used-before-assignment' checkFalse Positive 🦟A message is emitted but nothing is wrong with the codeA message is emitted but nothing is wrong with the codepython 3.8