Skip to content

Django-pylint don't recognize settings option in settings.json, neither work in UI #329

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
minifisk opened this issue Jul 21, 2021 · 1 comment

Comments

@minifisk
Copy link

minifisk commented Jul 21, 2021

  1. I can't get pylint-django to work as expected in the UI, I have activated the pylinter as the linter, but with the current settings nothing gets marked in my file. However, if I remove the line that loads the django settings ("--django-settings-module=jobs.settings") the linter start to work in the UI (but getting a ton of errors).

  2. I've tried running the linter in the CLI by running:

pylint --load-plugins=pylint_django account_management_views.py

Which returns a list of suggestions from the linter on lines to be adjusted, which seems accurate, but getting a bit of weird errors, such as import problems with rest_framework (which I can find in pip freeze list, so it's not missing there). The most surprising thing is that one line say:

Account_management_views.py:1:0: E5110: Django was not configured. For more information run pylint --load-plugins=pylint_django --help-msg=django-not-configured (django-not-configured)

These are my settings:

"editor.formatOnSave": true,
"python.formatting.provider": "autopep8",
"python.linting.enabled": true,
"python.linting.lintOnSave": true,
"python.linting.pylintEnabled": true,
"python.linting.pylintArgs": [
  "--load-plugins=pylint_django",
  "--django-settings-module=jobs.settings"
],
@minifisk minifisk changed the title Django-pylint don't recognize settings option in settings.json, as don't work in UI Django-pylint don't recognize settings option in settings.json, neither work in UI Jul 21, 2021
@tauzahmd
Copy link

tauzahmd commented Aug 1, 2021

#325 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants