mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-08 06:44:46 +08:00
test: list comprehension name resolve should not include its own definitions
This commit is contained in:
@@ -131,6 +131,12 @@ a = [a if 1.0 else '' for a in [1] if [1.0]]
|
||||
#? int() str()
|
||||
a[0]
|
||||
|
||||
# name resolve should be correct
|
||||
left, right = 'a', 'b'
|
||||
left, right = [x for x in (left, right)]
|
||||
#? str()
|
||||
left
|
||||
|
||||
# with a dict literal
|
||||
#? str()
|
||||
[a for a in {1:'x'}][0]
|
||||
|
||||
Reference in New Issue
Block a user