]> 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:07:46 +0000 (03:07 +0100)
psycopg/psycopg/cursor.py
psycopg/psycopg/cursor_async.py
psycopg/psycopg/server_cursor.py

index 98500a64ba1167567694d4e3b8524b134ef91c17..10741c95fd2eec7c4dd8f408c8a7c236986b8d98 100644 (file)
@@ -34,13 +34,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 6c6d3f814855a82bab22307238c1e47fa3cd9f57..603560155c2800b6cda9206a38da7df9ab33d044 100644 (file)
@@ -31,15 +31,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 7039d2950105cb7d706ee22c2be55e2c79d07622..1c6e77aa10f96b33647029e9be2083edbf29c7a4 100644 (file)
@@ -216,7 +216,7 @@ class ServerCursor(ServerCursorMixin["Connection[Any]", Row], Cursor[Row]):
 
     @overload
     def __init__(
-        self: "ServerCursor[Row]",
+        self,
         connection: "Connection[Row]",
         name: str,
         *,
@@ -227,7 +227,7 @@ class ServerCursor(ServerCursorMixin["Connection[Any]", Row], Cursor[Row]):
 
     @overload
     def __init__(
-        self: "ServerCursor[Row]",
+        self,
         connection: "Connection[Any]",
         name: str,
         *,
@@ -357,7 +357,7 @@ class AsyncServerCursor(
 
     @overload
     def __init__(
-        self: "AsyncServerCursor[Row]",
+        self,
         connection: "AsyncConnection[Row]",
         name: str,
         *,
@@ -368,7 +368,7 @@ class AsyncServerCursor(
 
     @overload
     def __init__(
-        self: "AsyncServerCursor[Row]",
+        self,
         connection: "AsyncConnection[Any]",
         name: str,
         *,