mirror of
https://github.com/davidhalter/jedi.git
synced 2026-02-01 04:26:07 +08:00
fixed edge cases of dynamic array completion, which led to StopIteration
This commit is contained in:
@@ -239,8 +239,9 @@ def _check_array_additions(compare_array, module, is_list):
|
||||
for c in calls:
|
||||
call_path = list(c.generate_call_path())
|
||||
separate_index = call_path.index(add_name)
|
||||
if not len(call_path) > separate_index + 1:
|
||||
if add_name == call_path[-1] or separate_index == 0:
|
||||
# this means that there is no execution -> [].append
|
||||
# or the keyword is at the start -> append()
|
||||
continue
|
||||
backtrack_path = iter(call_path[:separate_index])
|
||||
|
||||
|
||||
@@ -383,6 +383,8 @@ first(1.0)[0]
|
||||
|
||||
def third():
|
||||
b = []
|
||||
b.extend
|
||||
extend()
|
||||
b.extend(first())
|
||||
return list(b)
|
||||
#?
|
||||
|
||||
Reference in New Issue
Block a user