forked from VimPlug/jedi
Fix some old regression tests.
This commit is contained in:
@@ -431,8 +431,12 @@ class Evaluator(object):
|
||||
def_ = name.get_definition()
|
||||
is_simple_name = name.parent.type not in ('power', 'trailer')
|
||||
if is_simple_name:
|
||||
if name.parent.type in ('file_input', 'classdef', 'funcdef'):
|
||||
return [self.wrap(name.parent)]
|
||||
if name.parent.type == 'classdef':
|
||||
return [er.ClassContext(self, name.parent, context)]
|
||||
elif name.parent.type == 'funcdef':
|
||||
return [er.FunctionContext(self, context, name.parent)]
|
||||
elif name.parent.type == 'file_input':
|
||||
raise NotImplementedError
|
||||
if def_.type == 'expr_stmt' and name in def_.get_defined_names():
|
||||
return self.eval_statement(context, def_, name)
|
||||
elif def_.type == 'for_stmt':
|
||||
|
||||
Reference in New Issue
Block a user