sqlalchemy-stubs
sqlalchemy-stubs copied to clipboard
Select __init__ rejecting Column only accepts ColumnElement.
I think a the select init accepts a Column but, it isn't listed in the Union of types. It looks like an easy fix but, I don't know this well enough to have confidence.
Example Code stolen from sqlalchemy docs as example.
from sqlalchemy import table, column, select
user = table("user",
column("id"),
column("name"),
column("description"),
)
stmt = select(user.c.description).where(user.c.name == 'wendy')
Results in error: Argument 1 to "Select" has incompatible type "Column[Any]"; expected "Optional[Iterable[Union[ColumnElement[Any], FromClause, int]]]"
Versions
mypy==0.931
mypy-extensions==0.4.3
sqlalchemy==1.4.31
sqlalchemy-stubs==0.4
tomli==2.0.0