Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Select __init__ rejecting Column only accepts ColumnElement. #235

Open
BobACollins opened this issue Jan 27, 2022 · 0 comments
Open

Select __init__ rejecting Column only accepts ColumnElement. #235

BobACollins opened this issue Jan 27, 2022 · 0 comments

Comments

@BobACollins
Copy link

BobACollins commented Jan 27, 2022

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant