1
0
forked from VimPlug/jedi

Merge pull request #2079 from Hoblovski/fix/star-unpack

Fix unhandled '*' operator in infer_node
This commit is contained in:
Dave Halter
2025-11-13 15:53:08 +00:00
committed by GitHub
2 changed files with 10 additions and 0 deletions

View File

@@ -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)

View File

@@ -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