You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
VS Code version: 1.18.1
Python Extension version: 0.8.0
Python Version: 3.6.3
OS and version: 10.13.1
Actual behavior
code is not prompting with intellisense for sqlalchemy.
Expected behavior
Steps to reproduce:
File structure
In ./__init__.py
"""Blog main module"""
from flask import Flask
from flask_sqlalchemy import SQLAlchemy
app = Flask(__name__)
app.config.from_object('settings')
db = SQLAlchemy(app)
from blog import views
from author import views
In author/models.py
from flask_blog_code import db
class Author(db.Model):
id = db.Column(db.Integer, primary_key=True)
fullname = db.Column(db.string(80))
email = db.Column(db.String(35), unique=True)
username = db.Column(db.String(80), unique=True)
password = db.Column(db.String(80))
is_author = db.Column(db.Boolean)
test = db.Co
I do not have a sample repo with non-sensitive code to upload, but I would like to confirm that I have this exact same issue and that it is definitely specific to the Flask-SQLAlchemy package
@pjatinsight I don't know SQLAlchemy to know well enough if that would potentially cause the issue with Python 2.7.10, but that is an old release so I would update anyway (and if you're trying to learn Python then do use Python 3 instead of Python 2).
Workaround. If you have the ms-python.python installed you actually change the linter from pylint to flake8 which is a better linter and the problem is gone.
To change the linter run the command Select Linter from the Command Palette.
I am using flake8 on all my projects without any problems so far ;)
Let me know if you are ok with this solution !!!
Reacted by psibal, Daniel da Rocha, Ykäz Mihar, Emi, axlrod, David Odohi and David Council
Reacted by Adam and Ilyas Bakirov (aka eRIC)
Reacted by Daniel da Rocha, Ykäz Mihar and David Odohi
I dont understand why this is closed, This issue is about vscode intellisense, not python linting, Even with trying other linters vscode still does not appropriately display intellisense for flask-sqlalchemy,
Activity
DonJayamanne commentedon Jan 18, 2018
@diazgilberto Please could you provide a sample repo for this.
seven-share commentedon Feb 1, 2018
i have almost the same question.
ide show E1101:Instance of 'SQLAlchemy' has no 'Column' member
but it works
DonJayamanne commentedon Feb 18, 2018
seven (@seven-share) if you have a sample repo, please upload it, so I can test this.
rivasd commentedon Mar 2, 2018
I do not have a sample repo with non-sensitive code to upload, but I would like to confirm that I have this exact same issue and that it is definitely specific to the Flask-SQLAlchemy package
brettcannon commentedon Mar 7, 2018
@pjatinsight there were some bugs around our
.pylintrcdetection that should be fixed in the next release.3 remaining items
brettcannon commentedon Mar 12, 2018
@pjatinsight I don't know SQLAlchemy to know well enough if that would potentially cause the issue with Python 2.7.10, but that is an old release so I would update anyway (and if you're trying to learn Python then do use Python 3 instead of Python 2).
brettcannon commentedon Mar 12, 2018
But since this is a Pylint issue I'm closing as an upstream problem.
anselal commentedon May 8, 2018
Workaround. If you have the
ms-python.pythoninstalled you actually change the linter frompylinttoflake8which is a better linter and the problem is gone.To change the linter run the command
Select Linterfrom theCommand Palette.I am using
flake8on all my projects without any problems so far ;)Let me know if you are ok with this solution !!!
KoduIsGreat commentedon Jun 6, 2018
I dont understand why this is closed, This issue is about vscode intellisense, not python linting, Even with trying other linters vscode still does not appropriately display intellisense for flask-sqlalchemy,
anselal commentedon Jun 6, 2018
Adam (@KoduIsGreat) did you try changing your linter as I mention above ?
KoduIsGreat commentedon Jun 6, 2018
Yes.
"Even with trying other linters vscode still does not appropriately display intellisense for flask-sqlalchemy,"
patrys commentedon Jun 6, 2018
Anastasios Selalmazidis (@anselal) I believe Adam (@KoduIsGreat) is talking about the original issue (ie. autocomplete not working), not the comment about
pylint(ie. things being underlined incorrectly).KoduIsGreat commentedon Jun 6, 2018
Patryk Zawadzki (@patrys) Yes thats correct. I think this was closed incorrectly. or should I just create a new issue.
"SQLAlchemy intellisense" is the name of this issue, I'm confused as to how we got onto a linting discussion in the first place lol.
brettcannon commentedon Jun 6, 2018
Adam (@KoduIsGreat) please create a new issue.