dropbox / sqlalchemy-stubs

Mypy plugin and stubs for SQLAlchemy
Apache License 2.0
570 stars 101 forks source link

Typing for sqlalchemy core? #162

Closed Dreamsorcerer closed 2 years ago

Dreamsorcerer commented 4 years ago

I was wondering if there were plans to support more accurate typing for core, or if it is even possible?

e.g.

t = db.tables["users"]
ret = await conn.execute(t.select().where(t.c.user_id == user_id))
reveal_type(ret)

Gives Any. It would be nice to have something more like a TypedDict based on the table definition.