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

"Select" has no attribute filter_by #254

Open
nik123 opened this issue Feb 22, 2023 · 0 comments
Open

"Select" has no attribute filter_by #254

nik123 opened this issue Feb 22, 2023 · 0 comments

Comments

@nik123
Copy link

nik123 commented Feb 22, 2023

I tried to add sqlalchemy-stubs into my project and I experience problems with following construct:

db.execute(select(User).filter_by(id=user_id))

mypy error is:

error: "Select" has no attribute "filter_by"  [attr-defined]

I've looked into sqlalchemy code and Select construct clearly has filter_by method.

I use Python 3.9.5 with sqlalchemy==1.4.41, mypy==0.990 and sqlalchemy-stubs==0.4.

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

1 participant