Fixed Python 2 support

pull/199/head
Ashley Whetter 4 years ago
parent 4ba45cfacb
commit 428e8526f0

@ -175,7 +175,7 @@ class Parser(object):
properties.append("async")
return_annotation = None
if node.returns:
if getattr(node, "returns", None):
return_annotation = node.returns.as_string()
# Python 2 has no support for type annotations, so use getattr
elif getattr(node, "type_comment_returns", None):

Loading…
Cancel
Save