forked from VimPlug/jedi
Move some code around.
This commit is contained in:
@@ -446,8 +446,6 @@ class Evaluator(object):
|
|||||||
return types
|
return types
|
||||||
|
|
||||||
def goto_definitions(self, context, name):
|
def goto_definitions(self, context, name):
|
||||||
is_simple_name = name.parent.type not in ('power', 'trailer')
|
|
||||||
if is_simple_name:
|
|
||||||
def_ = name._get_definition()
|
def_ = name._get_definition()
|
||||||
if def_ is not None:
|
if def_ is not None:
|
||||||
type_ = def_.type
|
type_ = def_.type
|
||||||
@@ -457,6 +455,8 @@ class Evaluator(object):
|
|||||||
return [er.FunctionContext(self, context, name.parent)]
|
return [er.FunctionContext(self, context, name.parent)]
|
||||||
|
|
||||||
if type_ == 'expr_stmt':
|
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)
|
return self.eval_statement(context, def_, name)
|
||||||
if type_ == 'for_stmt':
|
if type_ == 'for_stmt':
|
||||||
container_types = self.eval_element(context, def_.children[3])
|
container_types = self.eval_element(context, def_.children[3])
|
||||||
|
|||||||
Reference in New Issue
Block a user