forked from VimPlug/jedi
call_of_name was modified. Fixed an issue that was created earlier.
This commit is contained in:
@@ -248,6 +248,7 @@ class Evaluator(object):
|
||||
return self.eval_statement(element)
|
||||
elif element.type == 'power':
|
||||
types = self._eval_atom(element.children[0])
|
||||
print(element, element.start_pos)
|
||||
for trailer in element.children[1:]:
|
||||
if trailer == '**': # has a power operation.
|
||||
raise NotImplementedError
|
||||
@@ -372,7 +373,7 @@ class Evaluator(object):
|
||||
def_ = name.get_definition()
|
||||
if def_.type == 'expr_stmt' and name in def_.get_defined_names():
|
||||
return self.eval_statement(def_, name)
|
||||
call = helpers.call_of_name(name, True)
|
||||
call = helpers.call_of_name(name)
|
||||
return self.eval_element(call)
|
||||
|
||||
def goto(self, name):
|
||||
|
||||
@@ -82,6 +82,9 @@ def call_of_name(name, cut_own_trailer=False):
|
||||
You would get a node with the content ``list([]).append`` back.
|
||||
|
||||
This generates a copy of the original ast node.
|
||||
|
||||
# TODO remove cut_own_trailer option, since its always used with it. Just
|
||||
# ignore it, It's not what we want anyway. Or document it better?
|
||||
"""
|
||||
par = name
|
||||
if tree.is_node(par.parent, 'trailer'):
|
||||
|
||||
Reference in New Issue
Block a user