]> git.ipfire.org Git - thirdparty/psycopg.git/commitdiff
Fix documentation of Cursor.pgresult
authorDaniele Varrazzo <daniele.varrazzo@gmail.com>
Wed, 24 Feb 2021 18:42:50 +0000 (19:42 +0100)
committerDaniele Varrazzo <daniele.varrazzo@gmail.com>
Wed, 24 Feb 2021 18:44:53 +0000 (19:44 +0100)
docs/cursor.rst
psycopg3/psycopg3/cursor.py

index 18ecbf25f0ba890c36eeba9cce139e8faf0f06b9..128bf4b2810a2d3cf429093159e0c650ef3f5d36 100644 (file)
@@ -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
index 9d2b75b2932600781225ebdfedf7d80d51afd2fd..e33640829a4cd97fbdcfc8ecb49ac9e622926d39 100644 (file)
@@ -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