1
0
forked from VimPlug/jedi

fixed edge cases of dynamic array completion, which led to StopIteration

This commit is contained in:
David Halter
2012-10-10 23:10:25 +02:00
parent 8059b075c6
commit b204f2f5d9
2 changed files with 4 additions and 1 deletions

View File

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