美文网首页毕业设计相关
Instance of 'SQLAlchemy' has no

Instance of 'SQLAlchemy' has no

作者: Stone0823 | 来源:发表于2019-05-23 18:00 被阅读0次

使用 Visual Studio Code 开发 Flask 程序的时候,一直提示 Instance of 'SQLAlchemy' has no 'Column' member 错误,同样的代码在其它的 IDE 就没有问题,在网上查了一下,判断是 pylint 的原因。pylint 是一个 Python 源代码检查和高亮的工具,类似的还有 flake8 等。

解决方法:关闭 pylint,启用 flake8。

在 Visual Studio Code 中,点击左下角的“设置”按钮,然后定位到 Python,切换到 json 界面:

然后将 user setting 作如下修改:

"python.linting.flake8Enabled": true,
"python.linting.pylintEnabled": false,
"python.linting.flake8Args": [
    "--disable=E1101",
    "--max-line-length=120"
]

参考

相关文章

网友评论

    本文标题:Instance of 'SQLAlchemy' has no

    本文链接:https://www.haomeiwen.com/subject/tivbzqtx.html