From: Denis Laxalde Date: Wed, 25 May 2022 14:55:49 +0000 (+0200) Subject: test: drop unneeded Cursor Row type variable from typing tests X-Git-Tag: 3.1~68 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7417e0838259cef32c106a714c369ca20b9f51cf;p=thirdparty%2Fpsycopg.git test: drop unneeded Cursor Row type variable from typing tests Follow up 2f6e7669f0b32e7a99dd6db0ef41a18af119909f. --- diff --git a/tests/typing_example.py b/tests/typing_example.py index aa3882cc7..a26ca49b4 100644 --- a/tests/typing_example.py +++ b/tests/typing_example.py @@ -10,7 +10,7 @@ from psycopg import AsyncConnection, AsyncCursor, AsyncServerCursor def int_row_factory( - cursor: Union[Cursor[int], AsyncCursor[int]] + cursor: Union[Cursor[Any], AsyncCursor[Any]] ) -> Callable[[Sequence[int]], int]: return lambda values: values[0] if values else 42 @@ -22,7 +22,7 @@ class Person: @classmethod def row_factory( - cls, cursor: Union[Cursor[Person], AsyncCursor[Person]] + cls, cursor: Union[Cursor[Any], AsyncCursor[Any]] ) -> Callable[[Sequence[str]], Person]: def mkrow(values: Sequence[str]) -> Person: name, address = values