1
0
forked from VimPlug/jedi

fix problems with positions in definitions with the same name on the same line

This commit is contained in:
David Halter
2013-02-17 00:14:30 +04:30
parent 8fd3910958
commit 89a2cb15d0
2 changed files with 7 additions and 3 deletions

View File

@@ -634,8 +634,12 @@ def follow_call_list(call_list, follow_array=False):
def follow_call(call):
"""Follow a call is following a function, variable, string, etc."""
path = call.generate_call_path()
scope = call.get_parent_until(pr.IsScope)
return follow_call_path(path, scope, call.start_pos)
# find the statement of the Scope
s = call
while not s.parent.isinstance(pr.IsScope):
s = s.parent
return follow_call_path(path, s.parent, s.start_pos)
def follow_call_path(path, scope, position):

View File

@@ -253,7 +253,7 @@ class Scope(Simple, IsScope):
self.start_pos[0], self.end_pos[0])
class Module(object):
class Module(IsScope):
""" For isinstance checks. fast_parser.Module also inherits from this. """
pass