forked from VimPlug/jedi
Move some code around.
This commit is contained in:
@@ -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])
|
||||
|
||||
Reference in New Issue
Block a user