如果在使用vs code 编写flask代码,创建数据库等模板类出现在Column下方有警告红线,提示内容为Instance of 'SQLAlchemy' has no 'Column' member
这并不意味着你的代码出了问题,而是pylint产生的一些古怪,反正我没研究明白,https://code.visualstudio.com/docs/python/linting,这是vs code官网的解释,如果按照将pylint更改为flake8,你会发现代码需要规范,太麻烦。https://www.xuebuyuan.com/1699038.html 这是规范

点击设置-settings,点击右上角切换到json,顺着添加代码!

Instance of SQLAlchemy has no Column member

{
    "python.linting.pylintArgs": [
        "--load-plugins",
        "pylint-flask"
    ]
}
保存即可,不报错了!
Instance of SQLAlchemy has no Column member

相关文章:

  • 2022-12-23
  • 2021-04-03
  • 2021-10-29
  • 2021-08-29
  • 2021-03-27
  • 2022-12-23
  • 2022-12-23
  • 2021-08-03
猜你喜欢
  • 2022-12-23
  • 2021-12-23
  • 2021-11-21
  • 2021-06-30
  • 2021-07-29
  • 2022-12-23
  • 2021-11-11
相关资源
相似解决方案