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

Would it be possible to make the type for `JSON` columns accept `Mapping[str, Any]` instead of (in addition to?) `Dict[str, Any]`? My specific use case is I have a fixed...

priority-normal
topic-stubs
needs discussion

Hi! Thanks for this awesome project! I am [TypedDjango](https://github.com/TypedDjango) team member, we maintain types for, well, django. And we do pretty much the same job. For example, we also test...

We already support descriptor-like behavior and type inference for `Column`s. We need tests for this so that it will not regress. Depends on #2.

help wanted
priority-normal

Here is a very simplified reproducer: ```python from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.schema import Column from sqlalchemy.types import Integer Base = declarative_base() class BaseMixin(Base): __abstract__ = True field1 = Column(Integer)...

bug
priority-normal
topic-plugins

For example `Column(ARRAY(Integer())).any` is `sqlalchemy.sql.sqltypes.ARRAY.Comparator.any`. We should support this. This requires both a plugin update and filling in comparator classes in stubs. This may be tricky because column types depend...

enhancement
topic-plugins
topic-stubs
needs discussion

Our tests are configured so that Python 2 tests are skipped if Python 2 interpreter can't be found, somehow this happens on Travis.

priority-normal

Current mypy plugin system is practically ready for better support for this. Ideally we would want https://github.com/python/mypy/issues/6259 implemented. First thing here would be to infer `Column[str]` for `users.c.name` instead of...

enhancement
priority-high
topic-plugins

A user should be able to annotate an argument/variable that is expected to take rows of a specific table/join/etc. For example: ```python class BasicData(SQLResult): id: int name: str ``` We...

enhancement
priority-high
topic-plugins

We need to add a simple plugin that would replace `Column[X]` with `InstrumentedAttribute[Column[X], X]` and make the latter a descriptor instead instead of the former. In addition the plugin would...

bug
priority-low
topic-plugins

These modules require special attention: * [ ] `engine/base.pyi` * [ ] `engine/result.pyi` * [ ] `util/_collections.pyi` * [x] `sql/base.pyi` * [x] `sql/compiler.pyi` * [x] `sql/ddl.pyi` (?) * [ ]...

enhancement
help wanted
priority-high
topic-stubs