Fix tuple unpacking for special case

This commit is contained in:
Dave Halter committed 2019-05-31 17:07:51 +02:00
1 parent cdc9520c9d
commit d9332aec8c
3 files changed
+9 -1

No files matched your search

+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'):