Imagine a function which dynamically adds attributes to an object using setattr
. The reason for doing so is that I want to map some external structure
Try this! My problem solved!
Pylint doesn't understand the Django's dynamic filed. Thus, we need to teach what the Django is to Pylint
*for vscode in Windows 10 *
$ pip install pylint-django
$ cd your_project_folder
$ code . // run vscode
Install extension for Python, Django Snippets, Django Template in vscode
Open .vscode/settings.json
in vscode and add:
{
"python.linting.pylintEnabled": true,
"python.linting.enabled": true,
"python.pythonPath": "venv\\Scripts\\python.exe",
"python.linting.pylintArgs": [
"--load-plugins",
"pylint_django"
],
}