1
0
forked from VimPlug/jedi

pep0484 return type support

This commit is contained in:
Claude
2015-12-13 23:05:14 +01:00
parent 68cbabe819
commit 7e8112d607
4 changed files with 81 additions and 9 deletions

View File

@@ -866,7 +866,9 @@ class Function(ClassOrFunc):
def annotation(self):
try:
return self.children[6] # 6th element: def foo(...) -> bar
if self.children[3] == "->":
return self.children[4]
assert self.children[3] == ":"
except IndexError:
return None