That's my user settings in vscode
{ "python.pythonPath": "/Users/cristiano/miniconda3/envs/django-rest-2/bin/python", "python.linting.pylintEnabled": true, "python.linting.enabled": true, "python.linting.pylintArgs": [ "--load-plugins", "pylint_django" ], }
I installed the plugin via conda, same as the pylint
pylint 2.1.1 py36_0 pylint-django 0.11.1 py_1 conda-forge pylint-plugin-utils 0.4 py_0 conda-forge
If i commented out the "python.linting.pylintArgs" section, pylint works with no problem. I ned to enable the plugin to avoid django-specific errros such as "Entity.objects.all()", but if I enable it, the lint stop working: it does not highlight standard errors o warning the previously was doing it.
I have same exact behaviour using vscode for win and mac. I tried also to use the .pylintrc file as described here but I have the same result: lint stop working. Same behaviour using base conda env or a custom one.
The problem mostly happens in Linux. You need to make sure pylint is installed in the same environment that VSCode detects. This may be the problem! Open up a terminal and run pip --version , it will tell you the current version of pip and python associated with pip .
Enable linting# To enable linters, open the Command Palette (Ctrl+Shift+P) and select the Python: Select Linter command. The Select Linter command adds "python. linting. <linter>Enabled": true to your settings, where <linter> is the name of the chosen linter.
To disable TSLint in VS Code, we can set the "typescript. validate. enable" setting to false in our VS Code settings. json file.
pylintrc and put it in the master folder; running Pylint from the command line displays the score.
This config for pylint
is working for me:
"python.linting.pylintEnabled": true, "python.linting.pylintArgs": [ "--disable=C0111", // missing docstring "--load-plugins=pylint_django,pylint_celery", ],
I just got the same issue. Like @J0hnG4lt said, I had a problem with the python path. I didn't point to the path of the environment, which I have installed pylint_django. This config is work for me. Thanks @Manu.
"python.pythonPath": "/Users/mc976/Documents/Programming/Python/Practice/music_service/venv/bin/python3", "python.linting.pylintEnabled": true, "python.linting.pylintArgs": [ "--disable=C0111", "--load-plugins", "pylint_django" ]
Besides, I think you should check your environment to make sure that you have correctly installed pylint_django
by using pip list
.
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