为什么我没有得到 python flask sqlalchemy 自动完成功能?我已经关注了 'SQLAlchemy' 实例没有 'Column' 成员(无成员)本指南,但它仍然不起作用。我已经使用了用户和工作区设置。我的全局用户 settings.json 包含以下内容:
"python.linting.pylintEnabled": true,
"python.linting.enabled": true,
"python.linting.pylintArgs": [
"--load-plugins",
"pylint_flask_sqlalchemy",
"pylint_flask"
],
我的 app.py 有以下内容:
from flask import Flask, render_template, url_for
from flask_sqlalchemy import SQLAlchemy
app = Flask(__name__)
app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///test.db'
db = SQLAlchemy(app)
class Todo(db.Model):
id = db.Column(db.Integer, primary_key=True)
content = db.Column(db.String(200), nullable=False)
completed = db. // doesnt autocomplete "Column"
@app.route("/")
def index():
return render_template("index.html")
if __name__ == "__main__":
app.run(debug=True)