I have the following python code:
from typing import List
class User:
id: str
name: str
def __init__(self, id: str, name: str):
self.id
self.name = name
UserList = List[User]
User is highlighted in green but not UserList.
Here is a screen shot on VsCode:
It causes incoherent highlights such as:
Is there a way to have UserList highlighted in green by VsCode ?
VsCode Version: 1.65.2 with python and Pylance extension installed
CodePudding user response:
The semantic scope of UserList
is :variable.other.readwrite
The semantic scope of User
is: entity.name.type.class
on the line
from typing import List, Tuple
List
and Tuple
have a different color and scope
This should not be so it validates a bug issue for Pylance