I have been writing my python code in VSCode with a python extension named 'python' on Ubuntu for many days. It has been very nice.
However, today I meet some problems as shown in the picture:
I have write the correct code which can be run properly (both for debugging and running through the Terminal). But there are many green underlines and a few red underlines which give many tips as:
for green underlines:
C0326:No space allowed before bracket (pylint)
W0621:Redefining name 'img' from outer scope (line 60) (pylint)
C0103:Invalid variable name "c" (pylint)
C0326:Exactly one space required after comma (pylint)
C0303:Trailing whitespace (pylint)
and so on
for red underlines:
E0602:Undefined variable 'Runtime' (pylint)
Unspecified run-time error.
It seems this occured since I pressed one shortcut key accidentally, but I don't know which key it is.
How can I get rid of these underlines?
I'm the author of the extension. An updated was pushed out on the 9th of June. It is possible you hadn't updated for a while. To get rid of these messages you could either fix the corresponding errors or just turn off linting by going into the settings.json file and adding the following setting:
"python.linting.enabled":false
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With