10
votes

If I have the following code:

print("hello")
a = 2
b =3
print "hello"

The only pylint message I get within VSCode or the command line is:

Missing parentheses in call to 'print'. Did you mean print("hello")? (, line 4) pylint(syntax-error) [4,1]

If I fix the error then I get no messages from pylint within VSCode, but from a command line I get all the warnings such as bad spacing, bad const variable name, etc. and only get the above error if I call pylint with -E.

I'm running python 3.7.0 installed via miniconda.

Two questions really: 1. Is there a way to get the warnings as well as the errors at the same time 2. How do I fix VSCode to stop showing only errors

Thanks for any help.

btw, this is my settings file entry for python:

"[python]": {},
"python.linting.pylintEnabled": true,
"python.linting.enabled": true,
"python.linting.lintOnSave": true,
2

2 Answers

10
votes

Seems that's the default behaviour for PyLint in VSCode. To fix it add

"python.linting.pylintArgs": ["--enable=F,E,W"]

This overrides the default (strict checks) and enables all fatal(F), error(E) & warning(W) messages. The vscode docs mention a lot of other ways to configure this behaviour: https://code.visualstudio.com/docs/python/linting#_default-pylint-rules

-2
votes

i simply disabled pylint for python by going to,

file>preference>python>linting

and everything is working normal and totally fine.