From ff3c12f483eda2c2d4b8b99fecb48a82e8e57180 Mon Sep 17 00:00:00 2001 From: salahadin-hassen Date: Thu, 29 Oct 2026 12:20:27 +0300 Subject: [PATCH] [psycopg2] Improve wait callback types --- stubs/psycopg2/psycopg2/_psycopg.pyi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stubs/psycopg2/psycopg2/_psycopg.pyi b/stubs/psycopg2/psycopg2/_psycopg.pyi index 1cde17a9a4de..ee6dfdcd303a 100644 --- a/stubs/psycopg2/psycopg2/_psycopg.pyi +++ b/stubs/psycopg2/psycopg2/_psycopg.pyi @@ -628,7 +628,7 @@ def adapt(obj: object, protocol=..., alternate=..., /) -> Any: ... def encrypt_password( password: str | bytes, user: str | bytes, scope: connection | cursor | None = None, algorithm: str | None = None ) -> str: ... -def get_wait_callback() -> Incomplete | None: ... +def get_wait_callback() -> Callable[[connection], object] | None: ... def libpq_version() -> int: ... def new_array_type(values: tuple[int, ...], name: str, baseobj: _type) -> _type: ... def new_type( @@ -637,4 +637,4 @@ def new_type( def parse_dsn(dsn: str | bytes) -> dict[str, Any]: ... def quote_ident(ident: str | bytes, scope) -> str: ... def register_type(obj: _type, conn_or_curs: connection | cursor | None = None, /) -> None: ... -def set_wait_callback(none: Callable[..., Incomplete] | None, /) -> None: ... +def set_wait_callback(none: Callable[[connection], object] | None, /) -> None: ...