Binaryify / OneDark-Pro

Atom's iconic One Dark theme for Visual Studio Code
https://marketplace.visualstudio.com/items?itemName=zhuangtongfa.Material-theme
MIT License
1.52k stars 289 forks source link

Python PEP 3107 -- Function Annotations is not properly handled #367

Closed lkolfy closed 3 years ago

lkolfy commented 4 years ago

On visual studio code 1.41.0 with OneDark-Pro v. 3.2.1 the syntax highligthing doesn't handle properly the PEP 3107 for python language as show below: immagine

it should work like this below where the function "get_villages" is properly highlighted when I erase the "-> list" string:

immagine

Thank you for your great work :)

Binaryify commented 4 years ago

could you provide the code in your screenshots?

lkolfy commented 4 years ago

here a generic python file to show the problem.Luca

Il lunedì 23 dicembre 2019, 03:01:15 CET, binaryify <notifications@github.com> ha scritto:  

could you provide the code in your screenshots?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

import bs4

def login(url, name, password, headers): return

def parse_server_time(soup): return

def parse_rank(soup): return

def parse_alliance(soup): return

class esempio:

def __init__(self, url, name, password, headers=None):
    super().__init__()

    self.login = login(url, name, password, headers)

    self.__villages = {}  # id: village
    self._nation_id = None
    self._nation = None

def get_server_time(self) -> str:
    """ Restituisce l'ora del server """
    html = self.login.get_html("do.php")
    soup = bs4.BeautifulSoup(html, 'html5lib')
    return parse_server_time(soup)
server_time = property(get_server_time)

def get_rank(self) -> int:
    html = self.login.get_html("sp.php")
    soup = bs4.BeautifulSoup(html, 'html5lib')
    return parse_rank(soup)
rank = property(get_rank)

def get_alliance_name(self) -> int:
    """ Restituisce l'identificativo dell'alleanza del giocatore """
    html = self.login.get_html("sp.php")
    soup = bs4.BeautifulSoup(html, 'html5lib')
    return parse_alliance(soup)
alliance_name = property(get_alliance_name)