sqlalchemy2-stubs
sqlalchemy2-stubs copied to clipboard
PEP-484 typing stubs for SQLAlchemy 1.4
### Description ### Checklist This pull request is: - [ ] A documentation / typographical error fix - Good to go, no issue or tests are needed - [x] A...
The old sqlalchemy-stubs from dropbox included an approximation for the behavior of mapped classes using declarative setup, that is ``` class Foo(Model): a = Column(DateTime) Foo.a # type is Column[DateTime]...
**Describe the bug** Given the code below I regularly run into a mypy crash when the cache is warm. **Expected behavior** No crash **To Reproduce** I am having a hard...
**Describe the bug** Exception with `INTERNAL ERROR: maximum semantic analysis iteration count reached` **Expected behavior** A message like `error: Name "Address" is not defined [name-defined]` **To Reproduce** Type check the...
**Describe the bug** mypy gives me, has no attribute "any" above error on column "User.addresses" attribute. also, "has" vise versa ```python stmt = ( select(User.fullname). where(User.addresses.any(Address.email_address == '[email protected]')) ) session.execute(stmt).all()...
**Describe the bug** I'd like to switch from the [dropbox/sqlalchemy](https://github.com/dropbox/sqlalchemy-stubs) stubs to the official stubs, however when the declarative base is defined as attribute of an instance, it is not...
**Describe the bug** When a column type is not directly using an SA column class but instead an indirection is in place, the column is not added to `__init__` and...
**Describe the bug** mypy enables `--no-implicit-reexport` for stub files: > Note this is always treated as enabled for stub files. https://mypy.readthedocs.io/en/stable/command_line.html#cmdoption-mypy-no-implicit-reexport Many of the sqlalchemy stubs reexport and so mypy...
#63 is closed as a duplicate of sqlalchemy/sqlalchemy#6255, which is closed as fixed. However, the problem still occurs: ``` python # test_case.py from __future__ import annotations from sqlalchemy import Column,...
**Describe the bug** Table columns have optional[T] type even when they are defined with `nullable=False` **Expected behavior** Expected for type to be just "builtins.str" (not optional) **To Reproduce** ```py #...