]> git.ipfire.org Git - thirdparty/psycopg.git/commit
Remove constraints on Row TypeVar
authorDenis Laxalde <denis.laxalde@dalibo.com>
Thu, 25 Feb 2021 07:24:29 +0000 (08:24 +0100)
committerDenis Laxalde <denis.laxalde@dalibo.com>
Fri, 23 Apr 2021 06:50:16 +0000 (08:50 +0200)
commitc0178fc1fb08a4d46995538ab906ca9f9e0b040f
tree17ba6ee061d9ebd6434247671c2f106375f89296
parent5e039c0e08d66c7e767cbafcbfcf3cdb8fc937f2
Remove constraints on Row TypeVar

It's not clear why there is both Tuple[Any, ...] and Any as possible
types for Row and since Any is one possibility it seems that anything is
possible so those constraints appear to be useless.

We can now remove a few '# type: ignore[no-any-return]' in
*Cursor.fetchone(). On the other hand, mypy wants us to declare the type
of 'records' values coming from transformer's load_rows():

    error: Need type annotation for 'records' (hint: "records: List[<type>] = ...")  [var-annotated]
psycopg3/psycopg3/cursor.py
psycopg3/psycopg3/proto.py
psycopg3/psycopg3/server_cursor.py