diff --git a/stubs/psycopg2/psycopg2/_psycopg.pyi b/stubs/psycopg2/psycopg2/_psycopg.pyi index 45d62c52d..dd2150819 100644 --- a/stubs/psycopg2/psycopg2/_psycopg.pyi +++ b/stubs/psycopg2/psycopg2/_psycopg.pyi @@ -496,7 +496,7 @@ def get_wait_callback(*args, **kwargs): ... def libpq_version(*args, **kwargs): ... def new_array_type(oids, name, baseobj): ... def new_type(oids, name, castobj): ... -def parse_dsn(*args, **kwargs): ... +def parse_dsn(dsn: str | bytes) -> dict[str, Any]: ... def quote_ident(*args, **kwargs): ... def register_type(*args, **kwargs): ... def set_wait_callback(_none): ... diff --git a/stubs/psycopg2/psycopg2/extras.pyi b/stubs/psycopg2/psycopg2/extras.pyi index fdd7cf429..edd63870b 100644 --- a/stubs/psycopg2/psycopg2/extras.pyi +++ b/stubs/psycopg2/psycopg2/extras.pyi @@ -31,9 +31,9 @@ from .extensions import connection as _connection, cursor as _cursor, quote_iden class DictCursorBase(_cursor): row_factory: Any def __init__(self, *args, **kwargs) -> None: ... - def fetchone(self): ... - def fetchmany(self, size: Any | None = ...): ... - def fetchall(self): ... + def fetchone(self) -> tuple[Any, ...] | None: ... + def fetchmany(self, size: int | None = ...) -> list[tuple[Any, ...]]: ... + def fetchall(self) -> list[tuple[Any, ...]]: ... def __iter__(self): ... class DictConnection(_connection): @@ -79,9 +79,9 @@ class NamedTupleCursor(_cursor): def execute(self, query, vars: Any | None = ...): ... def executemany(self, query, vars): ... def callproc(self, procname, vars: Any | None = ...): ... - def fetchone(self): ... - def fetchmany(self, size: Any | None = ...): ... - def fetchall(self): ... + def fetchone(self) -> tuple[Any, ...] | None: ... + def fetchmany(self, size: int | None = ...) -> list[tuple[Any, ...]]: ... + def fetchall(self) -> list[tuple[Any, ...]]: ... def __iter__(self): ... class LoggingConnection(_connection):