From: Daniele Varrazzo Date: Wed, 3 Jan 2024 02:07:27 +0000 (+0100) Subject: chore: drop unneeded type annotations on self X-Git-Tag: 3.2.0~108 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cda3b03f874773170ea7b1d412c5a2726f091560;p=thirdparty%2Fpsycopg.git chore: drop unneeded type annotations on self --- diff --git a/psycopg/psycopg/cursor.py b/psycopg/psycopg/cursor.py index 98500a64b..10741c95f 100644 --- a/psycopg/psycopg/cursor.py +++ b/psycopg/psycopg/cursor.py @@ -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__( diff --git a/psycopg/psycopg/cursor_async.py b/psycopg/psycopg/cursor_async.py index 6c6d3f814..603560155 100644 --- a/psycopg/psycopg/cursor_async.py +++ b/psycopg/psycopg/cursor_async.py @@ -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] ): ... diff --git a/psycopg/psycopg/server_cursor.py b/psycopg/psycopg/server_cursor.py index 7039d2950..1c6e77aa1 100644 --- a/psycopg/psycopg/server_cursor.py +++ b/psycopg/psycopg/server_cursor.py @@ -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, *,