Python 3.x type hints in Visual Studio Code
Brett's solution mentioned in a comment above worked for me:
You might have too many extensions installed. ;) Having
Python
andPython for VSCode
could be interfering with each other.
When I removed Python for VSCode
, syntax highlighting began to work correctly.
I had this problem too... I changed my linter to mypy and that seemed to fix it.