1
0
forked from VimPlug/jedi

Fix the remaining lambda issue.

This commit is contained in:
Dave Halter
2017-04-11 18:18:31 +02:00
parent 5cd26615e8
commit afa6427861
2 changed files with 2 additions and 1 deletions

View File

@@ -497,7 +497,7 @@ class Evaluator(object):
return [TreeNameDefinition(context, name)] return [TreeNameDefinition(context, name)]
elif par.type == 'param' and par.name: elif par.type == 'param' and par.name:
return [ParamName(context, name)] return [ParamName(context, name)]
elif isinstance(par, (tree.Param, tree.Function, tree.Class)) and par.name is name: elif par.type in ('param', 'funcdef', 'classdef') and par.name is name:
return [TreeNameDefinition(context, name)] return [TreeNameDefinition(context, name)]
elif isinstance(stmt, tree.Import): elif isinstance(stmt, tree.Import):
module_names = imports.infer_import(context, name, is_goto=True) module_names = imports.infer_import(context, name, is_goto=True)

View File

@@ -655,6 +655,7 @@ class Lambda(Function):
return self.children[1:-2] return self.children[1:-2]
def is_generator(self): def is_generator(self):
# TODO this is actually not 100% true.
return False return False
@property @property