1
0
forked from VimPlug/jedi

The Lambda type should be lambdef, not lambda. Use the grammar types.

This commit is contained in:
Dave Halter
2017-04-11 18:28:25 +02:00
parent 685e630c03
commit 6190a65f23
5 changed files with 9 additions and 9 deletions

View File

@@ -290,7 +290,7 @@ class FunctionContext(use_metaclass(CachedMetaClass, context.TreeContext)):
@property
def name(self):
if self.tree_node.type == 'lambda':
if self.tree_node.type == 'lambdef':
return LambdaName(self)
return ContextName(self, self.tree_node.name)
@@ -320,7 +320,7 @@ class FunctionExecutionContext(context.TreeContext):
@recursion.execution_recursion_decorator()
def get_return_values(self, check_yields=False):
funcdef = self.tree_node
if funcdef.type == 'lambda':
if funcdef.type == 'lambdef':
return self.evaluator.eval_element(self, funcdef.children[-1])
if check_yields: