]> git.ipfire.org Git - thirdparty/psycopg.git/commitdiff
chore: fix typos on previously missed files 324/head
authorChristian Clauss <cclauss@me.com>
Tue, 28 Jun 2022 12:25:03 +0000 (14:25 +0200)
committerDaniele Varrazzo <daniele.varrazzo@gmail.com>
Tue, 12 Jul 2022 11:54:37 +0000 (12:54 +0100)
.github/workflows/tests.yml
psycopg/psycopg/_pipeline.py
psycopg/psycopg/copy.py
psycopg/psycopg/cursor.py
psycopg/psycopg/cursor_async.py
psycopg/psycopg/types/enum.py
tools/update_errors.py

index c01b99adf9d4ba52257b55ffb805c769dc1d17ae..510816c957e747c08fbb500052ab9db323dc19d2 100644 (file)
@@ -41,7 +41,7 @@ jobs:
       PSYCOPG_TEST_DSN: "host=127.0.0.1 user=postgres"
       PGPASSWORD: password
       PYTEST_ADDOPTS: --color yes
-      # Enable to run tests using the minumum version of dependencies.
+      # Enable to run tests using the minimum version of dependencies.
       # PIP_CONSTRAINT: ${{ github.workspace }}/tests/constraints.txt
 
     steps:
index fbbe97c23a654e9a79cfda31cd689a11bf386e6a..27526c16ab5efbce96c5681fbef7e39a0e1a3bb4 100644 (file)
@@ -69,7 +69,7 @@ class BasePipeline:
 
     @staticmethod
     def is_supported() -> bool:
-        """Return `!True` if the psycopg libpq wrapper suports pipeline mode."""
+        """Return `!True` if the psycopg libpq wrapper supports pipeline mode."""
         if BasePipeline._is_supported is None:
             # Support only depends on the libpq functions available in the pq
             # wrapper, not on the database version.
@@ -148,7 +148,7 @@ class BasePipeline:
     ) -> None:
         """Process a results set fetched from the current pipeline.
 
-        This matchs 'results' with its respective element in the pipeline
+        This matches 'results' with its respective element in the pipeline
         queue. For commands (None value in the pipeline queue), results are
         checked directly. For prepare statement creation requests, update the
         cache. Otherwise, results are attached to their respective cursor.
@@ -218,7 +218,7 @@ class Pipeline(BasePipeline):
                 self._exit()
             except Exception as exc2:
                 # Notice that this error might be pretty irrecoverable. It
-                # happens on COPY, for insance: even if sync succeeds, exiting
+                # happens on COPY, for instance: even if sync succeeds, exiting
                 # fails with "cannot exit pipeline mode with uncollected results"
                 if exc_val:
                     logger.warning("error ignored exiting %r: %s", self, exc2)
index 266df21f99002a8478670312d4eb05733d181c1c..a93ff8751ca8a7ba8ce7616fd450e7b7f6644a5a 100644 (file)
@@ -64,7 +64,7 @@ class BaseCopy(Generic[ConnectionType]):
 
     # Size of data to accumulate before sending it down the network. We fill a
     # buffer this size field by field, and when it passes the threshold size
-    # wee ship it, so it may end up being bigger than this.
+    # we ship it, so it may end up being bigger than this.
     BUFFER_SIZE = 32 * 1024
 
     # Maximum data size we want to queue to send to the libpq copy. Sending a
index 18cc9d2230ce29687283c53eaa098579a7a089c7..422af8a12f7d5ab9597e69de1c20952ec4062937 100644 (file)
@@ -785,7 +785,7 @@ class Cursor(BaseCursor["Connection[Any]", Row]):
                     first = False
         except e.Error as ex:
             # try to get out of ACTIVE state. Just do a single attempt, which
-            # shoud work to recover from an error or query cancelled.
+            # should work to recover from an error or query cancelled.
             if self._pgconn.transaction_status == ACTIVE:
                 try:
                     self._conn.wait(self._stream_fetchone_gen(first))
index 0be29a04feaffc389dcd54cb9284777aa1c4af97..7f71efaad887f7212364edbc79bf0e59aaa8e265 100644 (file)
@@ -145,7 +145,7 @@ class AsyncCursor(BaseCursor["AsyncConnection[Any]", Row]):
                     first = False
         except e.Error as ex:
             # try to get out of ACTIVE state. Just do a single attempt, which
-            # shoud work to recover from an error or query cancelled.
+            # should work to recover from an error or query cancelled.
             if self._pgconn.transaction_status == pq.TransactionStatus.ACTIVE:
                 try:
                     await self._conn.wait(self._stream_fetchone_gen(first))
index 6b130c477315db78c7b3e515ba2ead44de7935d4..94d833739cf6cd23c79cbf3c7accac6418fdf4ae 100644 (file)
@@ -39,7 +39,7 @@ class _BaseEnumLoader(Loader, Generic[E]):
             enc = conn_encoding(self.connection)
             label = data.decode(enc, "replace")  # type: ignore[union-attr]
             raise e.DataError(
-                f"bad memeber for enum {self.enum.__qualname__}: {label!r}"
+                f"bad member for enum {self.enum.__qualname__}: {label!r}"
             )
 
 
index 38ebb8e70007b31adcf94270500afc9f7180e540..638471c611c2eb933b53d8f189225c393ebf1a32 100755 (executable)
@@ -53,7 +53,7 @@ def parse_errors_txt(url):
         m = re.match(r"(.....)\s+(?:E|W|S)\s+ERRCODE_(\S+)(?:\s+(\S+))?$", line)
         if m:
             sqlstate, macro, spec = m.groups()
-            # skip sqlstates without specs as they are not publically visible
+            # skip sqlstates without specs as they are not publicly visible
             if not spec:
                 continue
             errlabel = spec.upper()