]> git.ipfire.org Git - thirdparty/psycopg.git/commitdiff
Fix type hint for `sql.SQL.join()`
authorDaniele Varrazzo <daniele.varrazzo@gmail.com>
Tue, 26 Oct 2021 12:11:59 +0000 (13:11 +0100)
committerDaniele Varrazzo <daniele.varrazzo@gmail.com>
Tue, 26 Oct 2021 12:13:35 +0000 (13:13 +0100)
Close #127.

docs/news.rst
psycopg/psycopg/sql.py

index e56edf7bebdbda9e2fcf09944ce739e31bfc2232..2dd53875bca281f38d6db0df7e027a4a44b83e9d 100644 (file)
@@ -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
 ^^^^^^^^^^^^^
 
index f715aab0451804e3126d9a43d6e5f34e22e7a392..13b1fe302463b6304acf8592497ab22aa4e03dd8 100644 (file)
@@ -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`.