mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-05-04 12:35:49 +08:00
psycopg2: correct return type (#7607)
Fixes the return type of `psycopg2.cursor.fetchone()` to match the psycopg2 code: https://github.com/psycopg/psycopg2/blob/1d3a89a0bba621dc1cc9b32db6d241bd2da85ad1/psycopg/cursor_type.c#L647-L651 https://github.com/psycopg/psycopg2/blob/1d3a89a0bba621dc1cc9b32db6d241bd2da85ad1/psycopg/cursor_type.c#L748-L786 It also matches the [psycopg2 documentation](https://www.psycopg.org/docs/cursor.html?highlight=copy_from#cursor.fetchone) as well as the [DB-API](https://peps.python.org/pep-0249/#fetchone)
This commit is contained in:
@@ -368,7 +368,7 @@ class cursor:
|
||||
def executemany(self, query: str | bytes | Composable, vars_list: Iterable[_Vars]) -> None: ...
|
||||
def fetchall(self) -> list[tuple[Any, ...]]: ...
|
||||
def fetchmany(self, size=...) -> list[tuple[Any, ...]]: ...
|
||||
def fetchone(self) -> tuple[Any, ...] | Any: ...
|
||||
def fetchone(self) -> tuple[Any, ...] | None: ...
|
||||
def mogrify(self, *args, **kwargs): ...
|
||||
def nextset(self): ...
|
||||
def scroll(self, value, mode=...): ...
|
||||
|
||||
Reference in New Issue
Block a user