1
0
forked from VimPlug/jedi

Move some code around.

This commit is contained in:
Dave Halter
2017-09-02 22:45:23 +02:00
parent 9663e343c2
commit 4a04bf78c7

View File

@@ -446,8 +446,6 @@ class Evaluator(object):
return types
def goto_definitions(self, context, name):
is_simple_name = name.parent.type not in ('power', 'trailer')
if is_simple_name:
def_ = name._get_definition()
if def_ is not None:
type_ = def_.type
@@ -457,6 +455,8 @@ class Evaluator(object):
return [er.FunctionContext(self, context, name.parent)]
if type_ == 'expr_stmt':
is_simple_name = name.parent.type not in ('power', 'trailer')
if is_simple_name:
return self.eval_statement(context, def_, name)
if type_ == 'for_stmt':
container_types = self.eval_element(context, def_.children[3])