vscode中错误信息:Instance of 'Session' has no 'add' member处理方式

问题:

在使用MySQL ORM框架 sqlalchemy包时,我在创建sessionmaker实例Session后将创建的数据对象添加进去发现报错:Instance of 'Session' has no 'add' member pylint(no-member)[31,1],在网上查询后得知解决方案:

点击设置→右上角点击打开设置(json)→在大括号中已有代码下添加代码:

    "python.linting.pylintArgs": [
        "--load-plugins",
        "pylint-flask"
    ]

保存后就没有报错了。

参考博客:https://blog.csdn.net/weixin_42236031/article/details/106960189

posted on 2020-10-03 19:20  行而下的坏死  阅读(871)  评论(0)    收藏  举报