mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-08 14:54:47 +08:00
Goto on trailers wasn't correct. Fixes #571.
This commit is contained in:
@@ -516,7 +516,7 @@ class Evaluator(object):
|
|||||||
))
|
))
|
||||||
|
|
||||||
scope = name.get_parent_scope()
|
scope = name.get_parent_scope()
|
||||||
if tree.is_node(name.parent, 'trailer'):
|
if tree.is_node(name.parent, 'trailer') and name.parent.children[0] == '.':
|
||||||
call = helpers.call_of_leaf(name, cut_own_trailer=True)
|
call = helpers.call_of_leaf(name, cut_own_trailer=True)
|
||||||
types = self.eval_element(call)
|
types = self.eval_element(call)
|
||||||
return resolve_implicit_imports(iterable.unite(
|
return resolve_implicit_imports(iterable.unite(
|
||||||
|
|||||||
@@ -30,6 +30,12 @@ b = math
|
|||||||
#! ['b = math']
|
#! ['b = math']
|
||||||
b
|
b
|
||||||
|
|
||||||
|
#! 18 ['foo = 10']
|
||||||
|
foo = 10;print(foo)
|
||||||
|
|
||||||
|
# -----------------
|
||||||
|
# classes
|
||||||
|
# -----------------
|
||||||
class C(object):
|
class C(object):
|
||||||
def b(self):
|
def b(self):
|
||||||
#! ['b = math']
|
#! ['b = math']
|
||||||
|
|||||||
Reference in New Issue
Block a user