From 94cbad8ca936663bff37928ae332d18e65a672a1 Mon Sep 17 00:00:00 2001 From: salahadin-hassen Date: Thu, 29 Oct 2026 21:17:19 +0300 Subject: [PATCH] [psycopg2] Improve string_types annotations Co-Authored-By: Claude Opus 5.5 --- 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 ee6dfdcd303a..e88bd5787714 100644 --- a/stubs/psycopg2/psycopg2/_psycopg.pyi +++ b/stubs/psycopg2/psycopg2/_psycopg.pyi @@ -97,7 +97,7 @@ class cursor: itersize: int row_factory: Incomplete | None scrollable: bool | None - string_types: Incomplete | None + string_types: dict[int, _type] | None tzinfo_factory: Callable[..., dt.tzinfo] withhold: bool def __init__(self, conn: _Connection, name: str | bytes | None = None) -> None: ... @@ -480,7 +480,7 @@ class connection: @property def status(self) -> int: ... @property - def string_types(self) -> dict[Incomplete, Incomplete]: ... + def string_types(self) -> dict[int, _type]: ... # Really it's dsn: str, async: int = 0, async_: int = 0, but # that would be a syntax error. def __init__(self, dsn: str, *, async_: int = 0) -> None: ...