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.1.17~6 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3c0b5627c71f3d8361c661c1da4fd016f2f1722c;p=thirdparty%2Fpsycopg.git chore: drop unneeded type annotations on self --- diff --git a/psycopg/psycopg/cursor.py b/psycopg/psycopg/cursor.py index 4346657ce..a54cb2022 100644 --- a/psycopg/psycopg/cursor.py +++ b/psycopg/psycopg/cursor.py @@ -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__( diff --git a/psycopg/psycopg/cursor_async.py b/psycopg/psycopg/cursor_async.py index 842de0f70..012e281bd 100644 --- a/psycopg/psycopg/cursor_async.py +++ b/psycopg/psycopg/cursor_async.py @@ -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] ): ... diff --git a/psycopg/psycopg/server_cursor.py b/psycopg/psycopg/server_cursor.py index 013a10b8d..d2f4ab14a 100644 --- a/psycopg/psycopg/server_cursor.py +++ b/psycopg/psycopg/server_cursor.py @@ -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, *,