]> git.ipfire.org Git - thirdparty/psycopg.git/commitdiff
chore: drop unneeded type annotations on self
authorDaniele Varrazzo <daniele.varrazzo@gmail.com>
Wed, 3 Jan 2024 02:07:27 +0000 (03:07 +0100)
committerDaniele Varrazzo <daniele.varrazzo@gmail.com>
Wed, 3 Jan 2024 02:10:17 +0000 (03:10 +0100)
psycopg/psycopg/cursor.py
psycopg/psycopg/cursor_async.py
psycopg/psycopg/server_cursor.py

index 4346657cee12525e0c9bc62cc2059e368d7f5adf..a54cb2022b684a90c331e0ec78ad1f888a88bb2b 100644 (file)
@@ -665,16 +665,11 @@ class Cursor(BaseCursor["Connection[Any]", Row]):
     __slots__ = ()
 
     @overload
-    def __init__(self: "Cursor[Row]", connection: "Connection[Row]"):
+    def __init__(self, connection: "Connection[Row]"):
         ...
 
     @overload
-    def __init__(
-        self: "Cursor[Row]",
-        connection: "Connection[Any]",
-        *,
-        row_factory: RowFactory[Row],
-    ):
+    def __init__(self, connection: "Connection[Any]", *, row_factory: RowFactory[Row]):
         ...
 
     def __init__(
index 842de0f70369ee1fe218d6826b039a6573d03c6a..012e281bdb4f3b2375d83bcd8a4700ea3b144984 100644 (file)
@@ -29,15 +29,12 @@ class AsyncCursor(BaseCursor["AsyncConnection[Any]", Row]):
     __slots__ = ()
 
     @overload
-    def __init__(self: "AsyncCursor[Row]", connection: "AsyncConnection[Row]"):
+    def __init__(self, connection: "AsyncConnection[Row]"):
         ...
 
     @overload
     def __init__(
-        self: "AsyncCursor[Row]",
-        connection: "AsyncConnection[Any]",
-        *,
-        row_factory: AsyncRowFactory[Row],
+        self, connection: "AsyncConnection[Any]", *, row_factory: AsyncRowFactory[Row]
     ):
         ...
 
index 013a10b8d34f032a4d48e2682eb532c2b4867177..d2f4ab14aa5399cc6a2a699d2bd7e3fbfc05b9d2 100644 (file)
@@ -215,7 +215,7 @@ class ServerCursor(ServerCursorMixin["Connection[Any]", Row], Cursor[Row]):
 
     @overload
     def __init__(
-        self: "ServerCursor[Row]",
+        self,
         connection: "Connection[Row]",
         name: str,
         *,
@@ -226,7 +226,7 @@ class ServerCursor(ServerCursorMixin["Connection[Any]", Row], Cursor[Row]):
 
     @overload
     def __init__(
-        self: "ServerCursor[Row]",
+        self,
         connection: "Connection[Any]",
         name: str,
         *,
@@ -356,7 +356,7 @@ class AsyncServerCursor(
 
     @overload
     def __init__(
-        self: "AsyncServerCursor[Row]",
+        self,
         connection: "AsyncConnection[Row]",
         name: str,
         *,
@@ -367,7 +367,7 @@ class AsyncServerCursor(
 
     @overload
     def __init__(
-        self: "AsyncServerCursor[Row]",
+        self,
         connection: "AsyncConnection[Any]",
         name: str,
         *,