oracle / graalpython

A Python 3 implementation built on GraalVM
Other
1.21k stars 104 forks source link

Wrong __annotations__ #206

Closed oroppas closed 3 years ago

oroppas commented 3 years ago

Function annotation

def annotated(a: int) -> float:
    pass

print(annotated.__annotations__)

in GraalPython misses return.

GraalPython

{'a': <class 'int'>}

CPython

{'a': <class 'int'>, 'return': <class 'float'>}
ppisl commented 3 years ago

This is the same issue as issue #178 . Because I have pull request that refers the issue #178, I'm closing this as duplicate of the mentioned issue.