MagicStack/MagicPython

Python function annotation is not working

doantranthanh opened this issue · 0 comments

Hi there,

My VSCode does not work well on highlight syntax with python function annotation. Details are following:

  • Editor name and version: VSCode version 1.62.3

  • Platform: Windows 10

  • Color scheme: Any (primary using Tokyo Night theme)

  • MagicPython version: latest

  • A sreenshot:
    image

  • 5-10 lines of surrounding code:

def gcd(a: int, b: int) -> int:
    if a == b:
        return a
    else:
        if a > b:
            return gcd(a-b, b)
        else:
            return gcd(a, b-a)


def gcd2(a: int, b: int):
    if b == 0:
        return a
    else:
        return gcd2(b, a % b)

Any ideas?

Thanks