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 models not having a query() attribute #63

Closed
hvdklauw opened this issue Jul 25, 2014 · 11 comments
Closed

SQLAlchemy models not having a query() attribute #63

hvdklauw opened this issue Jul 25, 2014 · 11 comments

Comments

@hvdklauw
Copy link

In my case I'm using the Flask-SQLAlchemy package

@hvdklauw
Copy link
Author

So maybe we need a thing just like the django thing to ignore these specific errors

@carlio
Copy link
Member

carlio commented Jul 27, 2014

Yes, that's probably the case. This probably requires a new pylint-sqlalchemy plugin.

@hvdklauw
Copy link
Author

On second thought, it might be an issue with Flask.

Flask extensions are imported from flask.ext.* while they actually reside in flask_*, can we somehow tell pylint to look there instead? That will resolve most of the false positives.

@carlio
Copy link
Member

carlio commented Jul 30, 2014

It turns out someone already asked that question: https://bitbucket.org/logilab/pylint/issue/95/how-can-i-write-a-plugin-to-change-imports

The answer is currently 'no' but it is being worked on.

@shortdudey123
Copy link

Doesn't look like much has happened on this. I am unable to use landscape.io with my flask projects right now. Any suggestions on workarounds?

from flask.ext import restful
 No name 'restful' in module 'flask.ext'

@teleyinex
Copy link

Here I've the same issue. With Flask you've lots of issues due to the extensions ;-) My solution, ignore them as I test the code extensively. However, this is suboptimal, and a better solution from prospector should be used ;-)

@kxxoling
Copy link

kxxoling commented Dec 9, 2014

Same issue here too.

@jschaf
Copy link

jschaf commented Jul 6, 2015

I made a pylint plugin that fixes the flask.ext import errors. See https://github.com/jschaf/pylint-flask. I haven't found anything for SQLAlchemy.

@teleyinex
Copy link

@jschaf great! Now they should include it in prospector and landscape :-)

@carlio
Copy link
Member

carlio commented Jul 6, 2015

@jschaf @teleyinex On it :)

@teleyinex
Copy link

woot!!!!!

@carlio carlio closed this as completed Dec 31, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants