dropbox / dropbox/sqlalchemy-stubs

Select __init__ rejecting Column only accepts ColumnElement.

Open
#235 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
583
Forks
96
PR merge metrics
No merged PRs in 30d

Description

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.
```python
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
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.