From d974dd5d9f054bf9f549e9f554622c5c42dd2785 Mon Sep 17 00:00:00 2001 From: maxtaran2010 Date: Wed, 8 Jul 2026 12:32:17 +0300 Subject: [PATCH] Fix typos in comments and docstrings - _asyncio_compat.py: supresses -> suppresses - connection.py: asyncronous -> asynchronous, postgresl -> postgresql, connnection -> connection - prepared_stmt.py: statitics -> statistics - protocol/codecs/array.pyx: dimentions -> dimensions, appened -> appended - protocol/coreproto.pyx: authentciation -> authentication, advertized -> advertised - protocol/scram.pyx: methos -> methods Co-Authored-By: Claude Sonnet 4.6 --- asyncpg/_asyncio_compat.py | 2 +- asyncpg/connection.py | 6 +++--- asyncpg/prepared_stmt.py | 2 +- asyncpg/protocol/codecs/array.pyx | 4 ++-- asyncpg/protocol/coreproto.pyx | 4 ++-- asyncpg/protocol/scram.pyx | 2 +- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/asyncpg/_asyncio_compat.py b/asyncpg/_asyncio_compat.py index a211d0a9..d0479cc7 100644 --- a/asyncpg/_asyncio_compat.py +++ b/asyncpg/_asyncio_compat.py @@ -33,7 +33,7 @@ async def wait_for(fut: compat.Awaitable[_T], timeout: float | None) -> _T: If the wait is cancelled, the task is also cancelled. - If the task supresses the cancellation and returns a value instead, + If the task suppresses the cancellation and returns a value instead, that value is returned. This function is a coroutine. diff --git a/asyncpg/connection.py b/asyncpg/connection.py index 71fb04f8..188f475f 100644 --- a/asyncpg/connection.py +++ b/asyncpg/connection.py @@ -175,7 +175,7 @@ async def remove_listener(self, channel, callback): def add_log_listener(self, callback): """Add a listener for Postgres log messages. - It will be called when asyncronous NoticeResponse is received + It will be called when asynchronous NoticeResponse is received from the connection. Possible message types are: WARNING, NOTICE, DEBUG, INFO, or LOG. @@ -2147,7 +2147,7 @@ async def connect(dsn=None, *, - host address(es) parsed from the *dsn* argument, - the value of the ``PGHOST`` environment variable, - on Unix, common directories used for PostgreSQL Unix-domain - sockets: ``"/run/postgresql"``, ``"/var/run/postgresl"``, + sockets: ``"/run/postgresql"``, ``"/var/run/postgresql"``, ``"/var/pgsql_socket"``, ``"/private/tmp"``, and ``"/tmp"``, - ``"localhost"``. @@ -2199,7 +2199,7 @@ async def connect(dsn=None, *, connection service file. :param servicefile: - The location of the connnection service file used to store + The location of the connection service file used to store connection parameters. :param loop: diff --git a/asyncpg/prepared_stmt.py b/asyncpg/prepared_stmt.py index 0c2d335e..ded56b91 100644 --- a/asyncpg/prepared_stmt.py +++ b/asyncpg/prepared_stmt.py @@ -128,7 +128,7 @@ async def explain(self, *args, analyze=False): :param args: Query arguments. :param analyze: If ``True``, the statement will be executed and - the run time statitics added to the return value. + the run time statistics added to the return value. :return: An object representing the execution plan. This value is actually a deserialized JSON output of the SQL diff --git a/asyncpg/protocol/codecs/array.pyx b/asyncpg/protocol/codecs/array.pyx index f8f9b8dd..2097a596 100644 --- a/asyncpg/protocol/codecs/array.pyx +++ b/asyncpg/protocol/codecs/array.pyx @@ -374,7 +374,7 @@ cdef _nested_array_decode(ConnectionSettings settings, # loop expects this. cpython.Py_INCREF(elem) - # Iterate over array dimentions and put the element in + # Iterate over array dimensions and put the element in # the correctly nested sublist. for j in reversed(range(ndims)): if indexes[j] == 0: @@ -393,7 +393,7 @@ cdef _nested_array_decode(ConnectionSettings settings, if indexes[j] == dims[j] and j != 0: # This array level is full, continue the # ascent in the dimensions so that this level - # sublist will be appened to the parent list. + # sublist will be appended to the parent list. elem = stride # Reset the index, this will cause the # new list to be allocated on the next diff --git a/asyncpg/protocol/coreproto.pyx b/asyncpg/protocol/coreproto.pyx index da96c412..4879a2cc 100644 --- a/asyncpg/protocol/coreproto.pyx +++ b/asyncpg/protocol/coreproto.pyx @@ -631,7 +631,7 @@ cdef class CoreProtocol: self.result_type = RESULT_FAILED self.result = apg_exc.InterfaceError( 'could not verify server signature for ' - 'SCRAM authentciation: scram-sha-256', + 'SCRAM authentication: scram-sha-256', ) self.scram = None @@ -694,7 +694,7 @@ cdef class CoreProtocol: cdef: WriteBuffer msg - # use the first supported advertized mechanism + # use the first supported advertised mechanism self.scram = SCRAMAuthentication(sasl_auth_methods[0]) # this involves a call and response with the server msg = WriteBuffer.new_message(b'p') diff --git a/asyncpg/protocol/scram.pyx b/asyncpg/protocol/scram.pyx index 9b485aee..c65985c8 100644 --- a/asyncpg/protocol/scram.pyx +++ b/asyncpg/protocol/scram.pyx @@ -68,7 +68,7 @@ cdef class SCRAMAuthentication: SCRAM-SHA-256-PLUS) but to do some ongoing discussion, there is a conscious decision by several driver authors to not support it as of yet. As such, the channel binding parameter is hard-coded to "n" for now, but can be updated - to support other channel binding methos in the future + to support other channel binding methods in the future """ AUTHENTICATION_METHODS = [b"SCRAM-SHA-256"] DEFAULT_CLIENT_NONCE_BYTES = 24