Skip to content

Commit bc3e246

Browse files
maxtaran2010maxtaran2010claude
authored
Fix typos in comments and docstrings (#1332)
- _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: maxtaran2010 <ocotifuzo727@gmail.com> Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent cdf816c commit bc3e246

6 files changed

Lines changed: 10 additions & 10 deletions

File tree

‎asyncpg/_asyncio_compat.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ async def wait_for(fut: compat.Awaitable[_T], timeout: float | None) -> _T:
3333
3434
If the wait is cancelled, the task is also cancelled.
3535
36-
If the task supresses the cancellation and returns a value instead,
36+
If the task suppresses the cancellation and returns a value instead,
3737
that value is returned.
3838
3939
This function is a coroutine.

‎asyncpg/connection.py‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ async def remove_listener(self, channel, callback):
175175
def add_log_listener(self, callback):
176176
"""Add a listener for Postgres log messages.
177177
178-
It will be called when asyncronous NoticeResponse is received
178+
It will be called when asynchronous NoticeResponse is received
179179
from the connection. Possible message types are: WARNING, NOTICE,
180180
DEBUG, INFO, or LOG.
181181
@@ -2171,7 +2171,7 @@ async def connect(dsn=None, *,
21712171
- host address(es) parsed from the *dsn* argument,
21722172
- the value of the ``PGHOST`` environment variable,
21732173
- on Unix, common directories used for PostgreSQL Unix-domain
2174-
sockets: ``"/run/postgresql"``, ``"/var/run/postgresl"``,
2174+
sockets: ``"/run/postgresql"``, ``"/var/run/postgresql"``,
21752175
``"/var/pgsql_socket"``, ``"/private/tmp"``, and ``"/tmp"``,
21762176
- ``"localhost"``.
21772177
@@ -2223,7 +2223,7 @@ async def connect(dsn=None, *,
22232223
connection service file.
22242224
22252225
:param servicefile:
2226-
The location of the connnection service file used to store
2226+
The location of the connection service file used to store
22272227
connection parameters.
22282228
22292229
:param loop:

‎asyncpg/prepared_stmt.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ async def explain(self, *args, analyze=False):
128128
129129
:param args: Query arguments.
130130
:param analyze: If ``True``, the statement will be executed and
131-
the run time statitics added to the return value.
131+
the run time statistics added to the return value.
132132
133133
:return: An object representing the execution plan. This value
134134
is actually a deserialized JSON output of the SQL

‎asyncpg/protocol/codecs/array.pyx‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,7 @@ cdef _nested_array_decode(ConnectionSettings settings,
374374
# loop expects this.
375375
cpython.Py_INCREF(elem)
376376

377-
# Iterate over array dimentions and put the element in
377+
# Iterate over array dimensions and put the element in
378378
# the correctly nested sublist.
379379
for j in reversed(range(ndims)):
380380
if indexes[j] == 0:
@@ -393,7 +393,7 @@ cdef _nested_array_decode(ConnectionSettings settings,
393393
if indexes[j] == dims[j] and j != 0:
394394
# This array level is full, continue the
395395
# ascent in the dimensions so that this level
396-
# sublist will be appened to the parent list.
396+
# sublist will be appended to the parent list.
397397
elem = stride
398398
# Reset the index, this will cause the
399399
# new list to be allocated on the next

‎asyncpg/protocol/coreproto.pyx‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -637,7 +637,7 @@ cdef class CoreProtocol:
637637
self.result_type = RESULT_FAILED
638638
self.result = apg_exc.InterfaceError(
639639
'could not verify server signature for '
640-
'SCRAM authentciation: scram-sha-256',
640+
'SCRAM authentication: scram-sha-256',
641641
)
642642
self.scram = None
643643

@@ -700,7 +700,7 @@ cdef class CoreProtocol:
700700
cdef:
701701
WriteBuffer msg
702702

703-
# use the first supported advertized mechanism
703+
# use the first supported advertised mechanism
704704
self.scram = SCRAMAuthentication(sasl_auth_methods[0])
705705
# this involves a call and response with the server
706706
msg = WriteBuffer.new_message(b'p')

‎asyncpg/protocol/scram.pyx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ cdef class SCRAMAuthentication:
6868
SCRAM-SHA-256-PLUS) but to do some ongoing discussion, there is a conscious
6969
decision by several driver authors to not support it as of yet. As such, the
7070
channel binding parameter is hard-coded to "n" for now, but can be updated
71-
to support other channel binding methos in the future
71+
to support other channel binding methods in the future
7272
"""
7373
AUTHENTICATION_METHODS = [b"SCRAM-SHA-256"]
7474
DEFAULT_CLIENT_NONCE_BYTES = 24

0 commit comments

Comments
 (0)