1
0
forked from VimPlug/jedi

seperate parser and testing code

This commit is contained in:
Claude
2015-12-13 21:13:20 +01:00
parent fadf4f4419
commit 5a8c46d509
4 changed files with 26 additions and 13 deletions

View File

@@ -1403,8 +1403,13 @@ class Param(BaseNode):
return None
def annotation(self):
# Generate from tfpdef.
raise NotImplementedError
tfpdef = self._tfpdef()
if is_node(tfpdef, 'tfpdef'):
assert tfpdef.children[1] == ":"
assert len(tfpdef.children) == 3
return tfpdef.children[2]
else:
return None
def _tfpdef(self):
"""