1

I am attempting to configure pylint to use in my Django project. However, in VS Code it does not seem to be working when I configure my settings.json.

For example, my settings.json is as follows:

{
    "python.linting.enabled": true,
    "python.linting.pylintEnabled": true,
    "python.linting.pylintArgs": [
      "--disable=C0111",
      "--load-plugins",
      "pylint_django",
      "--django-settings-module",
      "myproject.settings"
    ]
}

When I remove the two lines "--django-settings-module" and "myrpject.settings", pylint begins to work and throws linting errors. When I add the lines back, the linting errors go away (when they should actually be linting errors i.e. importing a package that isn't used).

Below is my folder structure for the project I am working in.

enter image description here

What could be the issue behind the django-settings-module? Why is it not registering when the argument is used?

Jamiu S.
  • 5,257
  • 5
  • 12
  • 34
Tony Silva
  • 19
  • 1
  • 1
    Does this answer your question? [enabling pylint\_django plugin in vscode, pylint stop working](https://stackoverflow.com/questions/53304116/enabling-pylint-django-plugin-in-vscode-pylint-stop-working) – Manoj Tolagekar Nov 02 '22 at 07:22
  • I did look at that, but as you can see from my settings.json file I implemented that question and still to no avail I am not getting the linter to work. It works when I comment out the django-settings-module. In one of the answers it said to set the python.pythonPath in settings.json but that setting config got deprecated. – Tony Silva Nov 02 '22 at 14:37

0 Answers0