enabling pylint_django plugin in vscode, pylint stop working

Crixo picture Crixo · Nov 14, 2018 · Viewed 10.5k times · Source

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.

Answer

Manu picture Manu · Feb 26, 2019

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",
 ],