-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SQLAlchemy intellisense #292
Comments
@diazgilberto Please could you provide a sample repo for this. |
i have almost the same question. |
@seven-share if you have a sample repo, please upload it, so I can test this. |
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 |
You can get a sample repo to see the issue from the Flask Mega Tutorial Part IV : Database. The link is also here: https://github.com/miguelgrinberg/microblog/archive/v0.4.zip Open the models.py file and you'll get the red underlines.. mouse over them and you get errors like: [pylint] E1101:Instance of 'SQLAlchemy' has no 'String' member I googled and found a post here: Following instructions there I made a pylintrc
Edited pylintrc and set
Closed and reopened models.py But I'm not sure this is a great solution... cos now pylint ignores anything to do with the db.. There is another solution on that thread that modifies something to do with pylint plugins... but its a bit beyond a python newbie like myself... |
Drat.... adding pylintrc didn't fix it...
[pylint] E1101:Instance of 'scoped_session' has no 'add' member |
@pjatinsight there were some bugs around our |
Great work. Thanks. |
@pjatinsight the new release went out just over an hour ago, so once the extension is updated to |
Thanks ! |
Hi Brett, With the new updated pylint.. I'm still getting a load of E1101 errors...in the models.py file... Do I need to clear out some cache or something ? Thanks PJ E1101:Instance of 'SQLAlchemy' has no 'Column' member |
... wondering now.. I have the python interpreter set to 2.7.10 in my virtualenvwrapper environment. |
@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). |
But since this is a Pylint issue I'm closing as an upstream problem. |
Thanks for your help Brett. |
Workaround. If you have the To change the linter run the command I am using Let me know if you are ok with this solution !!! |
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, |
@KoduIsGreat did you try changing your linter as I mention above ? |
Yes. |
@anselal I believe @KoduIsGreat is talking about the original issue (ie. autocomplete not working), not the comment about |
@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. |
@KoduIsGreat please create a new issue. |
Environment data
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
In
author/models.py
User Settings
Logs
Output from
Python
output panelOutput from
Console window
(Help->Developer Tools menu)The text was updated successfully, but these errors were encountered: