Pylint can't find SQLAlchemy query member

前端 未结 13 1442
予麋鹿
予麋鹿 2021-01-30 08:25

I have a Flask (v0.10.1) application using Flask-SQLAlchemy (v2.0) and I\'m trying to configure Pylint to check it. Running with Python 3.4.2.

First error was:



        
13条回答
  •  栀梦
    栀梦 (楼主)
    2021-01-30 08:57

    Solution

    pip install pylint-flask

    pip install pylint-flask-sqlalchemy

    Load the installed plugin.

    For example, if you use VS code, please edit settings.json file as follows:

    "python.linting.pylintArgs": ["--load-plugins", "pylint_flask_sqlalchemy", "pylint_flask"]

    Optional

    If having other warnings, define remaining members in generated-members in pylintrc file.

提交回复
热议问题