dropbox / dropbox/sqlalchemy-stubs

"Select" has no attribute filter_by

Open
#254 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
583
Forks
96
PR merge metrics
No merged PRs in 30d

Description

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.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.