VS Code PyLint Error E0602 (undefined variable) with ProtoBuf compiled Python Structure

北战南征 提交于 2019-12-05 19:11:28

I solved my problem. Apparently, pylint has(had?) problems with protobuf compiled python classes. There's a package available that solves this issue.

  • installed pylint-protobuf package (pip install pylint-protobuf)
  • added "python.linting.pylintArgs": ["--load-plugin","pylint_protobuf"] to User Settings in VS Code

No errors!

Check settings.json in .vscode folder I work in virtualenv but the source python path is local path. Change python's path to virtualenv. work to me. To know the path write "which python3" in the terminal with the VE activated.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!