forked from VimPlug/jedi
fixed edge cases of dynamic array completion, which led to StopIteration
This commit is contained in:
+2
-1
@@ -239,8 +239,9 @@ def _check_array_additions(compare_array, module, is_list):
|
|||||||
for c in calls:
|
for c in calls:
|
||||||
call_path = list(c.generate_call_path())
|
call_path = list(c.generate_call_path())
|
||||||
separate_index = call_path.index(add_name)
|
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
|
# this means that there is no execution -> [].append
|
||||||
|
# or the keyword is at the start -> append()
|
||||||
continue
|
continue
|
||||||
backtrack_path = iter(call_path[:separate_index])
|
backtrack_path = iter(call_path[:separate_index])
|
||||||
|
|
||||||
|
|||||||
@@ -383,6 +383,8 @@ first(1.0)[0]
|
|||||||
|
|
||||||
def third():
|
def third():
|
||||||
b = []
|
b = []
|
||||||
|
b.extend
|
||||||
|
extend()
|
||||||
b.extend(first())
|
b.extend(first())
|
||||||
return list(b)
|
return list(b)
|
||||||
#?
|
#?
|
||||||
|
|||||||
Reference in New Issue
Block a user