vim-python / python-syntax

Python syntax highlighting for Vim
MIT License
437 stars 83 forks source link

Handling of PEP 3107 (function annotation) #11

Closed Aluriak closed 7 years ago

Aluriak commented 7 years ago

Currently, this plugins seems to not recognize the following expression, made valid by PEP 3107:

def apply(func:callable) -> int:
    return f(0)

The -> token is highlighted in red, probably because detected as an error. This token does not appear in tests/test.py nor syntax/python.vim. Builtin callable is not highlighted.

nfnty commented 7 years ago

Thanks!

nfnty commented 7 years ago

Ugh, it's PEP 3107 not 3017...

Aluriak commented 7 years ago

Oops, sorry ! I've fixed it in OP.