Here's some doc fixes.  A couple of these I've had floating around in an SVN
for a few years now...  Feel free to sit on this patch and I'll include it
again with my next patch series, whatever that is.
>From 2f68fe5d9b83b8ce695a465add55991c179cd6c7 Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryz...@telsasoft.com>
Date: Sat, 27 Mar 2021 21:08:57 -0500
Subject: [PATCH] doc fixes

---
 docs/contents/pg/connection.rst |  6 +++---
 pgconn.c                        |  2 +-
 pgquery.c                       | 10 ++++++----
 3 files changed, 10 insertions(+), 8 deletions(-)

diff --git a/docs/contents/pg/connection.rst b/docs/contents/pg/connection.rst
index 7d721b8..015c14a 100644
--- a/docs/contents/pg/connection.rst
+++ b/docs/contents/pg/connection.rst
@@ -103,12 +103,12 @@ returns without waiting for the query to complete. The database connection
 cannot be used for other operations until the query completes, but the
 application can do other things, including executing queries using other
 database connections. The application can call ``select()`` using the
-``fileno```  obtained by the connection#s :meth:`Connection.fileno` method
+``fileno``  obtained by the connection's :meth:`Connection.fileno` method
 to determine when the query has results to return.
 
 This method always returns a :class:`Query` object. This object differs
 from the :class:`Query` object returned by :meth:`Connection.query` in a
-few way. Most importantly, when :meth:`Connection.send_query` is used, the
+few ways. Most importantly, when :meth:`Connection.send_query` is used, the
 application must call one of the result-returning methods such as
 :meth:`Query.getresult` or :meth:`Query.dictresult` until it either raises
 an exception or returns ``None``.
@@ -285,7 +285,7 @@ it's no different from a connection made using blocking calls.
 
 The required steps are to pass the parameter ``nowait=True`` to  the
 :meth:`pg.connect` call, then call :meth:`Connection.poll` until it either
-returns :const':`POLLING_OK` or raises an exception. To avoid blocking
+returns :const:`POLLING_OK` or raises an exception. To avoid blocking
 in :meth:`Connection.poll`, use `select()` or `poll()` to wait for the
 connection to be readable or writable, depending on the return code of the
 previous call to :meth:`Connection.poll`. The initial state of the connection
diff --git a/pgconn.c b/pgconn.c
index cf8d487..7ff3f9a 100644
--- a/pgconn.c
+++ b/pgconn.c
@@ -511,7 +511,7 @@ conn_describe_prepared(connObject *self, PyObject *args)
     /* reads args */
     if (!PyArg_ParseTuple(args, "s#", &name, &name_length)) {
         PyErr_SetString(PyExc_TypeError,
-                        "Method prepare() takes a string argument");
+                        "Method describe_prepared() takes a string argument");
         return NULL;
     }
 
diff --git a/pgquery.c b/pgquery.c
index 50f837b..ffa4e87 100644
--- a/pgquery.c
+++ b/pgquery.c
@@ -223,8 +223,10 @@ static PyObject* query_iter(queryObject *self)
     return (PyObject*) self;
 }
 
-/* __next__() method of the queryObject:
-   Returns the current current row as a tuple and moves to the next one. */
+/*
+ * __next__() method of the queryObject:
+ * Returns the current row as a tuple and moves to the next one.
+ */
 static PyObject *
 query_next(queryObject *self, PyObject *noargs)
 {
@@ -357,7 +359,7 @@ _query_build_field_info(PGresult *res, int col_num) {
 
 /* Get information on one or all fields of the query result. */
 static char query_fieldinfo__doc__[] =
-"fieldinfo() -- return info on field(s) in query";
+"fieldinfo([name]) -- return information about field(s) in query result";
 
 static PyObject *
 query_fieldinfo(queryObject *self, PyObject *args)
@@ -522,7 +524,7 @@ _query_row_as_dict(queryObject *self)
     return row_dict;
 }
 
-/* Return the current current row as a dict and move to the next one. */
+/* Return the current row as a dict and move to the next one. */
 static PyObject *
 query_next_dict(queryObject *self, PyObject *noargs)
 {
-- 
2.17.0

_______________________________________________
PyGreSQL mailing list
PyGreSQL@Vex.Net
https://mail.vex.net/mailman/listinfo/pygresql

Reply via email to