mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-09 23:34:45 +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()
|
#? int() str()
|
||||||
a[0]
|
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
|
# with a dict literal
|
||||||
#? str()
|
#? str()
|
||||||
[a for a in {1:'x'}][0]
|
[a for a in {1:'x'}][0]
|
||||||
|
|||||||
Reference in New Issue
Block a user