Skip to content
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 Model Object Unlinting #50

Closed
marcosstefani opened this issue Nov 11, 2017 · 3 comments
Closed

SQLAlchemy Model Object Unlinting #50

marcosstefani opened this issue Nov 11, 2017 · 3 comments
Labels
area-linting bug Issue identified by VS Code Team member as probable bug info-needed Issue requires more information from poster

Comments

@marcosstefani
Copy link

Environment data

VS Code version: 1.18.0
Python Extension version: 0.8.0
Python Version: 3.5
OS and version: Linux Ubuntu

Actual behavior

Errors during development, but running python works normally. In case the imported db is a class that returns SQLAlchemy()
image
image

Expected behavior

Do not display code inconsistency for cases like the one presented above.

Steps to reproduce:

  • Create db.py
    from flask_sqlalchemy import SQLAlchemy
    db = SQLAlchemy()

  • Use this importing db in the model class and declare the variables the way I presented in the print above.

@0xLeon
Copy link

0xLeon commented Nov 12, 2017

So you're saying, the error is the fact that pylint marks the property 'Column' as non-existent? Well, how's that an vscode-python error? It's a pylint error then. Also, afte checking the flask_sqlalchemy code, I don't think that's an error on pylint's side as well. There's properties defined on objects of this class during runtime. How should pylint resolve this? There's not __getattr__ or __getattribute__ defined on SQLAlchemy.

@DonJayamanne
Copy link

@marcosstefani please could you try linting the python file in the terminal using pylint. If you are still getting linter errors then this is an upstream issue (issue to be raised with pylint).

@brettcannon brettcannon added info-needed Issue requires more information from poster area-linting bug Issue identified by VS Code Team member as probable bug labels Nov 14, 2017
@brettcannon
Copy link
Member

Since it's been a month since more info was requested I'm going to close this. If you come back to this later, @marcosstefani , feel free to leave the info needed and we can re-open this issue.

@lock lock bot locked as resolved and limited conversation to collaborators Jul 12, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-linting bug Issue identified by VS Code Team member as probable bug info-needed Issue requires more information from poster
Projects
None yet
Development

No branches or pull requests

4 participants