dropbox / pyannotate

Auto-generate PEP-484 annotations
Apache License 2.0
1.43k stars 59 forks source link

Annotations are not generated for one-liner functions #24

Closed gvanrossum closed 6 years ago

gvanrossum commented 6 years ago

This function will not have an annotation added:

def logtest(a, b, c=7, *var, **kw): return 7, a, b

Change it to have the return on the next line and it will work:

def logtest(a, b, c=7, *var, **kw):
    return 7, a, b