1
0
forked from VimPlug/jedi

fixed the rest of the dynamic problems

This commit is contained in:
David Halter
2013-02-18 23:49:28 +04:30
parent c3fe5d04dd
commit b1825621ff

View File

@@ -282,7 +282,8 @@ def _check_array_additions(compare_array, module, is_list):
if isinstance(element, er.Array):
stmt = element._array.parent
else:
return None
# is an Instance with an ArrayInstance inside
stmt = element.var_args[0].var_args.parent
if isinstance(stmt, er.InstanceElement):
stop_classes = list(stop_classes) + [er.Function]
return stmt.get_parent_until(stop_classes)
@@ -306,14 +307,14 @@ def _check_array_additions(compare_array, module, is_list):
# can search for the same statement, that is in the module
# dict. Executions are somewhat special in jedi, since they
# literally copy the contents of a function.
if compare_array and isinstance(comp_arr_parent, er.Execution):
if isinstance(comp_arr_parent, er.Execution):
stmt = comp_arr_parent. \
get_statement_for_position(stmt.start_pos)
if stmt is None:
continue
# InstanceElements are special, because they don't get copied,
# but have this wrapper around them.
if compare_array and isinstance(comp_arr_parent, er.InstanceElement):
if isinstance(comp_arr_parent, er.InstanceElement):
stmt = er.InstanceElement(comp_arr_parent.instance, stmt)
if evaluate.follow_statement.push_stmt(stmt):