]> git.ipfire.org Git - thirdparty/psycopg.git/commitdiff
test: drop unneeded Cursor Row type variable from typing tests
authorDenis Laxalde <denis.laxalde@dalibo.com>
Wed, 25 May 2022 14:55:49 +0000 (16:55 +0200)
committerDaniele Varrazzo <daniele.varrazzo@gmail.com>
Wed, 25 May 2022 15:45:23 +0000 (16:45 +0100)
Follow up 2f6e7669f0b32e7a99dd6db0ef41a18af119909f.

tests/typing_example.py

index aa3882cc76e493db4779b224fb9c6d08aab3f2f0..a26ca49b49e2928b7538420c2de5c94553287ab7 100644 (file)
@@ -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