1
0
forked from VimPlug/jedi

override annotation() in Lambda, instead of checking in Function on type

This commit is contained in:
Claude
2015-12-14 22:02:11 +01:00
parent 6ce076f413
commit 0f6fb23d91

View File

@@ -879,9 +879,6 @@ class Function(ClassOrFunc):
return bool(self.yields)
def annotation(self):
if self.children[0] == "lambda":
# lambda functions have no annotation
return None
try:
if self.children[3] == "->":
return _fix_forward_reference(self.children[4])
@@ -964,6 +961,10 @@ class Lambda(Function):
def is_generator(self):
return False
def annotation(self):
# lambda functions do not support annotations
return None
@property
def yields(self):
return []