forked from VimPlug/jedi
Merge pull request #2079 from Hoblovski/fix/star-unpack
Fix unhandled '*' operator in infer_node
This commit is contained in:
@@ -251,6 +251,8 @@ def _infer_node(context, element):
|
||||
return NO_VALUES
|
||||
elif typ == 'namedexpr_test':
|
||||
return context.infer_node(element.children[2])
|
||||
elif typ == 'star_expr':
|
||||
return NO_VALUES
|
||||
else:
|
||||
return infer_or_test(context, element)
|
||||
|
||||
|
||||
@@ -527,3 +527,11 @@ lc = [x for a, *x in [(1, '', 1.0)]]
|
||||
lc[0][0]
|
||||
#?
|
||||
lc[0][1]
|
||||
|
||||
|
||||
xy = (1,)
|
||||
x, y = *xy, None
|
||||
|
||||
# whatever it is should not crash
|
||||
#?
|
||||
x
|
||||
|
||||
Reference in New Issue
Block a user