From: Daniele Varrazzo Date: Wed, 24 Feb 2021 18:42:50 +0000 (+0100) Subject: Fix documentation of Cursor.pgresult X-Git-Tag: 3.0.dev0~105 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=84e0984acde0c2dab632151730e8ef6f393c0612;p=thirdparty%2Fpsycopg.git Fix documentation of Cursor.pgresult --- diff --git a/docs/cursor.rst b/docs/cursor.rst index 18ecbf25f..128bf4b28 100644 --- a/docs/cursor.rst +++ b/docs/cursor.rst @@ -132,7 +132,11 @@ The `!Cursor` class .. automethod:: fetchall .. automethod:: nextset .. automethod:: scroll - .. autoattribute:: pgresult + .. attribute:: pgresult + :type: Optional[psycopg3.pq.PGresult] + + The result returned by the last query and currently exposed by the + cursor, if available, else `!None`. .. rubric:: Information about the data diff --git a/psycopg3/psycopg3/cursor.py b/psycopg3/psycopg3/cursor.py index 9d2b75b29..e33640829 100644 --- a/psycopg3/psycopg3/cursor.py +++ b/psycopg3/psycopg3/cursor.py @@ -79,7 +79,6 @@ class BaseCursor(Generic[ConnectionType]): def _reset(self) -> None: self._results: List["PGresult"] = [] self.pgresult: Optional["PGresult"] = None - """The `~psycopg3.pq.PGresult` exposed by the cursor.""" self._pos = 0 self._iresult = 0 self._rowcount = -1