pip install django black isort pylint pylint-django mypy django-stubs
settings.json
{
"editor.formatOnSave": true,
"python.formatting.provider": "black",
"python.formatting.blackArgs": [
"--line-length=120"
],
"python.linting.pylintEnabled": true,
"python.linting.enabled": true,
"python.linting.lintOnSave": true,
"python.linting.pylintArgs": [
"--load-plugins",
"pylint_django",
"--django-settings-module=core.settings",
"--max-line-length=120"
],
"editor.codeActionsOnSave": {
"source.organizeImports": true
},
"python.linting.mypyEnabled": true
}
.mypy.ini
[mypy]
plugins =
mypy_django_plugin.main
[mypy.plugins.django-stubs]
django_settings_module = "core.settings"
.isort.cfg
[settings]
profile=black