mirror of
https://github.com/davidhalter/jedi.git
synced 2026-05-18 06:19:39 +08:00
fixed a few bugs in get_in_function_call caching
This commit is contained in:
+5
-4
@@ -449,10 +449,11 @@ class Script(object):
|
|||||||
old_stmt = parser.module.get_statement_for_position(self.pos)
|
old_stmt = parser.module.get_statement_for_position(self.pos)
|
||||||
if old_stmt is None:
|
if old_stmt is None:
|
||||||
return None, 0
|
return None, 0
|
||||||
new_call, new_index = check_user_stmt(user_stmt)
|
old_call, old_index = check_user_stmt(old_stmt)
|
||||||
if new_call:
|
if old_call:
|
||||||
if str(new_call) == str(call) and index == new_index:
|
if str(old_call) == str(call):
|
||||||
return new_call, new_index
|
# return the index of the part_parser
|
||||||
|
return old_call, index
|
||||||
return None, 0
|
return None, 0
|
||||||
else:
|
else:
|
||||||
raise NotFoundError()
|
raise NotFoundError()
|
||||||
|
|||||||
Reference in New Issue
Block a user