Skip to content

Commit b80c0b8

Browse files
authored
Merge pull request #2079 from Hoblovski/fix/star-unpack
Fix unhandled '*' operator in infer_node
2 parents 88d3da4 + 1b33f0d commit b80c0b8

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

jedi/inference/syntax_tree.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,8 @@ def _infer_node(context, element):
251251
return NO_VALUES
252252
elif typ == 'namedexpr_test':
253253
return context.infer_node(element.children[2])
254+
elif typ == 'star_expr':
255+
return NO_VALUES
254256
else:
255257
return infer_or_test(context, element)
256258

test/completion/arrays.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -527,3 +527,11 @@ def test_func():
527527
lc[0][0]
528528
#?
529529
lc[0][1]
530+
531+
532+
xy = (1,)
533+
x, y = *xy, None
534+
535+
# whatever it is should not crash
536+
#?
537+
x

0 commit comments

Comments
 (0)