forked from VimPlug/jedi
Fix tuple unpacking for special case
This commit is contained in:
@@ -584,7 +584,7 @@ def unpack_tuple_to_dict(context, types, exprlist):
|
||||
"""
|
||||
if exprlist.type == 'name':
|
||||
return {exprlist.value: types}
|
||||
elif exprlist.type == 'atom' and exprlist.children[0] in '([':
|
||||
elif exprlist.type == 'atom' and exprlist.children[0] in ('(', '['):
|
||||
return unpack_tuple_to_dict(context, types, exprlist.children[1])
|
||||
elif exprlist.type in ('testlist', 'testlist_comp', 'exprlist',
|
||||
'testlist_star_expr'):
|
||||
|
||||
@@ -79,6 +79,11 @@ for a3, b3 in (1,""), (1,""), (1,""):
|
||||
a3
|
||||
#? str()
|
||||
b3
|
||||
for (a3, b3) in (1,""), (1,""), (1,""):
|
||||
#? int()
|
||||
a3
|
||||
#? str()
|
||||
b3
|
||||
|
||||
for a4, (b4, c4) in (1,("", list)), (1,("", list)):
|
||||
#? int()
|
||||
|
||||
@@ -27,6 +27,9 @@ a[0]
|
||||
a = [a for a,b in [(1,'')]]
|
||||
#? int()
|
||||
a[0]
|
||||
a = [a for (a,b) in [(1,'')]]
|
||||
#? int()
|
||||
a[0]
|
||||
|
||||
arr = [1,'']
|
||||
a = [a for a in arr]
|
||||
|
||||
Reference in New Issue
Block a user