From: Daniele Varrazzo Date: Tue, 26 Oct 2021 12:11:59 +0000 (+0100) Subject: Fix type hint for `sql.SQL.join()` X-Git-Tag: 3.0.2~27 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2b9161d7600068b562bc447c2c111f98a0cf2203;p=thirdparty%2Fpsycopg.git Fix type hint for `sql.SQL.join()` Close #127. --- diff --git a/docs/news.rst b/docs/news.rst index e56edf7be..2dd53875b 100644 --- a/docs/news.rst +++ b/docs/news.rst @@ -10,6 +10,12 @@ Release notes Current release --------------- +psycopg 3.0.2 +^^^^^^^^^^^^^ + +- Fix type hint for `sql.SQL.join()` (:ticket:`#127`). + + psycopg 3.0.1 ^^^^^^^^^^^^^ diff --git a/psycopg/psycopg/sql.py b/psycopg/psycopg/sql.py index f715aab04..13b1fe302 100644 --- a/psycopg/psycopg/sql.py +++ b/psycopg/psycopg/sql.py @@ -7,7 +7,7 @@ SQL composition utility module import codecs import string from abc import ABC, abstractmethod -from typing import Any, Iterator, List, Optional, Sequence, Union +from typing import Any, Iterator, Iterable, List, Optional, Sequence, Union from .pq import Escaping from .abc import AdaptContext @@ -280,7 +280,7 @@ class SQL(Composable): return Composed(rv) - def join(self, seq: Sequence[Composable]) -> Composed: + def join(self, seq: Iterable[Composable]) -> Composed: """ Join a sequence of `Composable`.