Pylint提示小记

  • 使用的是VSCode(Visual Studio Code)编辑器,明明引入model字段,但仍然提示:
[pylint] E1101:Class 'EmTwitter' has no 'objects' member

其实是小提示而已,解决办法:

pip install pylint-django

在项目“.vscode”文件夹或用户setting.json添加

"python.linting.pylintArgs": [
        "--load-plugins=pylint_django",
        "--errors-only"
    ]

Pylint提示小记
Share this