Reputation: 1224
I am using the new python syntax to describe what types my methods return e.g.,: def method(unpacked_message: dict) -> dict:
This seems to break the vscode color scheme
Expected colors:
Environment and vs code extensions:
The code runs flawlessly. Am I doing something wrong ?
Upvotes: 18
Views: 22959
Reputation: 790
it worked for me after Disabling "Python Debugger" Extention
Upvotes: 1
Reputation: 146
I'm using a temporary solution.
It's a way to create a meaningless def _(): pass.
def function() -> str:
def _():
pass
return 'Hello World!'
or
def function() -> str:
# def _():
return 'Hello World!'
Upvotes: 0
Reputation: 10372
Based on the information you provided, I reproduced the problem you described.
Reason: The Syntax Highlighting style provided by the extension "Python for VSCode
" is different from the extension "Python
".
Solution: Please disable the extension "Python for VSCode
".
before:
after:
Upvotes: 33