sqlalchemy2-stubs
sqlalchemy2-stubs copied to clipboard
PEP-484 typing stubs for SQLAlchemy 1.4
**Describe the bug** Storing an instance of `sqlalchemy.dialects.postgresql.UUID` to a variable and re-using that in the column declarations is seen as `NullType`. **Expected behavior** Type should be detected as `Column[UUID]`?...
Scenario that works as expected: `test_db.py`: ```py from sqlalchemy import String from sqlalchemy import Column from sqlalchemy.orm import declarative_base Base = declarative_base() class User(Base): __tablename__ = "user" name = Column(String)...
### Describe the bug I'm using VSCode with pylance and sqlalchmey=1.4.32. If I try to use the `add()` method of the `AsyncSession`, I get an pylance error: ``` Cannot access...
**Describe the bug** SQLAlchemy release 1.4.33 added a new optional `close: bool = True` parameter to `Engine#dispose()`. This is not declared in the type definition, at https://github.com/sqlalchemy/sqlalchemy2-stubs/blob/dd0e6cf7e1c61cc1c25cd1d8d72c9f322fa73d90/sqlalchemy-stubs/engine/base.pyi#L200 **Expected behavior** The...
Relevant block of code: ``` sa.and_( tb.c.VERSION == version, tb.c.ISIN.in_(isins) if isins is not None else True, tb.c.ISIN != None, # pylint: disable=singleton-comparison b.c.DATE.in_(dates)) ) ``` Error I get from...