sqlalchemy-stubs icon indicating copy to clipboard operation
sqlalchemy-stubs copied to clipboard

Mypy plugin and stubs for SQLAlchemy

Results 96 sqlalchemy-stubs issues
Sort by recently updated
recently updated
newest added

Right now `relationship(uselist=True)` uses `typing.Iterable`, which breaks most of our code. Relationship configuration is described in greater detail here: https://docs.sqlalchemy.org/en/13/orm/collections.html Right now this PR just replaces `typing.Iterable` with `list`. What...

This obviously does not cover every case, but it is a significant improvement in that it enables typing on the results of most queries.

Add extra Query method types. I passed through each of the `Query` methods without return types and checked the docs for each one of them, I added the types for...

Fixes #178 ~(CI failure will be fixed by #179 )~

Closes #156 Replaces PR #197

The process_bind_param and process_literal_param methods are called to do decorator-specific conversion of values, before deferring to the underlying .impl's conversion methods. This means they can return any value accepted by...

See https://docs.sqlalchemy.org/en/14/core/reflection.html#sqlalchemy.engine.reflection.Inspector.get_table_comment

As per https://github.com/sqlalchemy/sqlalchemy/blame/958f902b1fc528fed0be550bc573545de47ed854/lib/sqlalchemy/orm/session.py#L1131 the `Session` object has had `__enter__` and `__exit__` for about 17 months.

Related to: https://github.com/dropbox/sqlalchemy-stubs/issues/131 ## About https://github.com/dropbox/sqlalchemy-stubs/pull/132 fixed https://github.com/dropbox/sqlalchemy-stubs/issues/131, a bug that `sqlalchemy.Numeric` was treated as float, not `decimal.Decimal`. But it may introduce a new bug, that `sqlalchemy.Float` is also treated...