dark-plus-syntax icon indicating copy to clipboard operation
dark-plus-syntax copied to clipboard

[BUG] return type hinting in python

Open WooheonHong opened this issue 4 years ago • 0 comments

If I add a return type hinting, All codes under the function declaration are changed to the same color(#9CDCFE) except for the function name.

I found that this happens no matter what character you put in front of the function declaration letter ":".

def fun(x : int) -> x : int:
# all code #9CDCFE
    x += 1 
    return x 

# all code #9CDCFE
def fun2(): 
    pass
def fun(x : int):
# It is okay
    x += 1 
    return x 

def fun2():
    pass

WooheonHong avatar Jun 24 '21 09:06 WooheonHong