forked from VimPlug/jedi
fix a very annoying caching problem
This commit is contained in:
@@ -469,7 +469,7 @@ class Execution(Executable):
|
|||||||
|
|
||||||
if base.isinstance(Class):
|
if base.isinstance(Class):
|
||||||
# There maybe executions of executions.
|
# There maybe executions of executions.
|
||||||
stmts = [Instance(base, self.var_args)]
|
return [Instance(base, self.var_args)]
|
||||||
elif isinstance(base, Generator):
|
elif isinstance(base, Generator):
|
||||||
return base.iter_content()
|
return base.iter_content()
|
||||||
else:
|
else:
|
||||||
|
|||||||
@@ -13,6 +13,11 @@ def fast_parent_copy(obj):
|
|||||||
new_elements = {}
|
new_elements = {}
|
||||||
|
|
||||||
def recursion(obj):
|
def recursion(obj):
|
||||||
|
if isinstance(obj, pr.Statement):
|
||||||
|
# Need to set _set_vars, otherwise the cache is not working
|
||||||
|
# correctly, don't know why.
|
||||||
|
obj.get_set_vars()
|
||||||
|
|
||||||
new_obj = copy.copy(obj)
|
new_obj = copy.copy(obj)
|
||||||
new_elements[obj] = new_obj
|
new_elements[obj] = new_obj
|
||||||
|
|
||||||
|
|||||||
@@ -408,9 +408,6 @@ class Parser(object):
|
|||||||
stmt.parent = self.top_module
|
stmt.parent = self.top_module
|
||||||
self._check_user_stmt(stmt)
|
self._check_user_stmt(stmt)
|
||||||
|
|
||||||
# TODO somehow this is important here. But it slows down Jedi, remove!
|
|
||||||
stmt.get_set_vars()
|
|
||||||
|
|
||||||
if tok in always_break + not_first_break:
|
if tok in always_break + not_first_break:
|
||||||
self._gen.push_last_back()
|
self._gen.push_last_back()
|
||||||
return stmt, tok
|
return stmt, tok
|
||||||
|
|||||||
Reference in New Issue
Block a user