Fix tuple unpacking for special case

This commit is contained in:
Dave Halter
2019-05-31 17:07:51 +02:00
parent cdc9520c9d
commit d9332aec8c
3 changed files with 9 additions and 1 deletions
+1 -1
View File
@@ -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'):