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

Psycopg2 SQL.join false positive #10715

Closed
fivepapertigers opened this issue Sep 15, 2023 · 0 comments · Fixed by #10716
Closed

Psycopg2 SQL.join false positive #10715

fivepapertigers opened this issue Sep 15, 2023 · 0 comments · Fixed by #10716
Labels
priority: regression Something that worked before doesn't work anymore stubs: false positive Type checkers report false errors

Comments

@fivepapertigers
Copy link

The following produces sql.py:4: error: Argument 1 to "join" of "SQL" has incompatible type "list[Composable]"; expected "SupportsIter[Composable]" [arg-type]

from psycopg2.sql import SQL, Identifier


SQL(" ").join([SQL("SELECT * FROM"), Identifier("table")])

Just started happening and this seems related: #10630 (comment)

Full example: https://github.com/fivepapertigers/psycopg2-mypy-issue/tree/main

andersk added a commit to andersk/typeshed that referenced this issue Sep 15, 2023
Fixes python#10715.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
@andersk andersk mentioned this issue Sep 15, 2023
@srittau srittau added stubs: false positive Type checkers report false errors priority: regression Something that worked before doesn't work anymore labels Sep 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: regression Something that worked before doesn't work anymore stubs: false positive Type checkers report false errors
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants