mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-06 14:04:26 +08:00
fixed problem with empty statements in function calls
This commit is contained in:
@@ -628,15 +628,18 @@ class Execution(Executable):
|
|||||||
stmt._commands = [old]
|
stmt._commands = [old]
|
||||||
|
|
||||||
# *args
|
# *args
|
||||||
if stmt.get_commands()[0] == '*':
|
commands = stmt.get_commands()
|
||||||
arrays = evaluate.follow_call_list(stmt.get_commands()[1:])
|
if not len(commands):
|
||||||
|
continue
|
||||||
|
if commands[0] == '*':
|
||||||
|
arrays = evaluate.follow_call_list(commands[1:])
|
||||||
# *args must be some sort of an array, otherwise -> ignore
|
# *args must be some sort of an array, otherwise -> ignore
|
||||||
for array in arrays:
|
for array in arrays:
|
||||||
for field_stmt in array: # yield from plz!
|
for field_stmt in array: # yield from plz!
|
||||||
yield None, field_stmt
|
yield None, field_stmt
|
||||||
# **kwargs
|
# **kwargs
|
||||||
elif stmt.get_commands()[0] == '**':
|
elif commands[0] == '**':
|
||||||
arrays = evaluate.follow_call_list(stmt.get_commands()[1:])
|
arrays = evaluate.follow_call_list(commands[1:])
|
||||||
for array in arrays:
|
for array in arrays:
|
||||||
for key_stmt, value_stmt in array.items():
|
for key_stmt, value_stmt in array.items():
|
||||||
# first index, is the key if syntactically correct
|
# first index, is the key if syntactically correct
|
||||||
|
|||||||
Reference in New Issue
Block a user