-
-
Notifications
You must be signed in to change notification settings - Fork 219
Closed
Description
Passing a generator to SQL.join(), as suggested in the documentation for that method, produces errors in Mypy and Pyright:
import psycopg.sql as sql
sql.SQL(', ').join(sql.Identifier(n) for n in ['foo', 'bar', 'baz'])Mypy:
Argument 1 to "join" of "SQL" has incompatible type "Generator[Identifier, None, None]"; expected "Sequence[Composable]"
Pyright:
Argument of type "Generator[Identifier, None, None]" cannot be assigned to parameter "seq" of type "Sequence[Composable]" in function "join"
Perhaps the seq parameter could be annotated with Iterable instead of Sequence.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels