From 0deac2219396bc0eba7da53eb3a80932edbf2dd7 Mon Sep 17 00:00:00 2001 From: luz paz Date: Wed, 17 Nov 2021 07:30:51 -0500 Subject: [PATCH] Fix various source comment/doc typos Found via `codespell -q 3 -L ba,crate,datas,froms,gord,hist,inh,nd,selectin,strat,ue` --- doc/build/core/connections.rst | 2 +- doc/build/errors.rst | 2 +- doc/build/faq/connections.rst | 4 ++-- doc/build/orm/extensions/asyncio.rst | 2 +- lib/sqlalchemy/engine/base.py | 2 +- lib/sqlalchemy/sql/type_api.py | 2 +- test/dialect/postgresql/test_dialect.py | 2 +- test/orm/inheritance/test_single.py | 4 ++-- test/orm/test_deferred.py | 2 +- test/orm/test_mapper.py | 2 +- test/orm/test_relationships.py | 2 +- 11 files changed, 13 insertions(+), 13 deletions(-) diff --git a/doc/build/core/connections.rst b/doc/build/core/connections.rst index 0cf3c2e2a3..51262434bc 100644 --- a/doc/build/core/connections.rst +++ b/doc/build/core/connections.rst @@ -119,7 +119,7 @@ illustrated in the example below:: .. topic:: the Python DBAPI is where autobegin actually happens The design of "commit as you go" is intended to be complementary to the - design of the :term:`DBAPI`, which is the underyling database interface + design of the :term:`DBAPI`, which is the underlying database interface that SQLAlchemy interacts with. In the DBAPI, the ``connection`` object does not assume changes to the database will be automatically committed, instead requiring in the default case that the ``connection.commit()`` method is diff --git a/doc/build/errors.rst b/doc/build/errors.rst index 41802240ac..3146f77e2a 100644 --- a/doc/build/errors.rst +++ b/doc/build/errors.rst @@ -1431,7 +1431,7 @@ the :term:`detached` state. .. note:: The above reference to a "pre-buffered" vs. "un-buffered" :class:`_result.Result` object refers to the process by which the ORM converts incoming raw database rows from the :term:`DBAPI` into ORM - objects. It does not imply whether or not the underyling ``cursor`` + objects. It does not imply whether or not the underlying ``cursor`` object itself, which represents pending results from the DBAPI, is itself buffered or unbuffered, as this is essentially a lower layer of buffering. For background on buffering of the ``cursor`` results itself, see the diff --git a/doc/build/faq/connections.rst b/doc/build/faq/connections.rst index f8c4e5bcaa..02d088384c 100644 --- a/doc/build/faq/connections.rst +++ b/doc/build/faq/connections.rst @@ -446,8 +446,8 @@ as all methods are proxied through:: attribute is also added which will always refer to the real driver-level connection regardless of what API it presents. -Accessing the underlying connnection for an asyncio driver -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +Accessing the underlying connection for an asyncio driver +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ When an asyncio driver is in use, there are two changes to the above scheme. The first is that when using an :class:`_asyncio.AsyncConnection`, diff --git a/doc/build/orm/extensions/asyncio.rst b/doc/build/orm/extensions/asyncio.rst index fcaf104467..decba4dfc6 100644 --- a/doc/build/orm/extensions/asyncio.rst +++ b/doc/build/orm/extensions/asyncio.rst @@ -583,7 +583,7 @@ The above example prints something along the lines of:: particular SQLAlchemy API has been invoked by end-user code, and *before* some other internal aspect of that API occurs. - Constrast this to the architecture of the asyncio extension, which takes + Contrast this to the architecture of the asyncio extension, which takes place on the **exterior** of SQLAlchemy's usual flow from end-user API to DBAPI function. diff --git a/lib/sqlalchemy/engine/base.py b/lib/sqlalchemy/engine/base.py index ef62825251..3e577171b6 100644 --- a/lib/sqlalchemy/engine/base.py +++ b/lib/sqlalchemy/engine/base.py @@ -179,7 +179,7 @@ class Connection(Connectable): keeping the effect of such an option localized to a "sub" connection. .. versionchanged:: 2.0 The :meth:`_engine.Connection.execution_options` - method, in constrast to other objects with this method, modifies + method, in contrast to other objects with this method, modifies the connection in-place without creating copy of it. As discussed elsewhere, the :meth:`_engine.Connection.execution_options` diff --git a/lib/sqlalchemy/sql/type_api.py b/lib/sqlalchemy/sql/type_api.py index f588512687..06473aaac3 100644 --- a/lib/sqlalchemy/sql/type_api.py +++ b/lib/sqlalchemy/sql/type_api.py @@ -1591,7 +1591,7 @@ class TypeDecorator(SchemaEventTarget, TypeEngine): in a result row subsequent to statement execution time. Subclasses of :class:`_types.TypeDecorator` can override this method - to provide custom column expresion behavior for the type. This + to provide custom column expression behavior for the type. This implementation will **replace** that of the underlying implementation type. diff --git a/test/dialect/postgresql/test_dialect.py b/test/dialect/postgresql/test_dialect.py index c12f4a50ad..9a62f4e954 100644 --- a/test/dialect/postgresql/test_dialect.py +++ b/test/dialect/postgresql/test_dialect.py @@ -234,7 +234,7 @@ $$ LANGUAGE plpgsql;""" "connection not open", "could not receive data from server", "could not send data to server", - # psycopg2 client errors, psycopg2/conenction.h, + # psycopg2 client errors, psycopg2/connection.h, # psycopg2/cursor.h "connection already closed", "cursor already closed", diff --git a/test/orm/inheritance/test_single.py b/test/orm/inheritance/test_single.py index fbafdd85be..ed344f4d0a 100644 --- a/test/orm/inheritance/test_single.py +++ b/test/orm/inheritance/test_single.py @@ -596,8 +596,8 @@ class SingleInheritanceTest(testing.AssertsCompiledSQL, fixtures.MappedTest): ra = aliased(Report, subq) # this test previously used select_entity_from(). the standard - # conversion to use aliased() neds to be adjusted to be against - # Employee, not Manger, otherwise the ORM will add the manager single + # conversion to use aliased() needs to be adjusted to be against + # Employee, not Manager, otherwise the ORM will add the manager single # inh criteria to the outside which will break the outer join ma = aliased(Employee, subq) diff --git a/test/orm/test_deferred.py b/test/orm/test_deferred.py index b14313e8ba..9e53f22185 100644 --- a/test/orm/test_deferred.py +++ b/test/orm/test_deferred.py @@ -1580,7 +1580,7 @@ class InheritanceTest(_Polymorphic): ) # note this doesn't apply to "bound" loaders since they don't seem - # to have this ".*" featue. + # to have this ".*" feature. def test_load_only_subclass_of_type(self): s = fixture_session() diff --git a/test/orm/test_mapper.py b/test/orm/test_mapper.py index ec1ef37962..6ccbe194fe 100644 --- a/test/orm/test_mapper.py +++ b/test/orm/test_mapper.py @@ -924,7 +924,7 @@ class MapperTest(_fixtures.FixtureTest, AssertsCompiledSQL): sess = fixture_session() u1 = sess.get(User, 7) u2 = sess.get(User, 8) - # comparaison ops need to work + # comparison ops need to work a1 = sess.query(Address).filter(Address.user == u1).one() eq_(a1.id, 1) a1.user = u2 diff --git a/test/orm/test_relationships.py b/test/orm/test_relationships.py index 98de9abad7..60dc46f3f1 100644 --- a/test/orm/test_relationships.py +++ b/test/orm/test_relationships.py @@ -1034,7 +1034,7 @@ class OverlappingFksSiblingTest(fixtures.MappedTest): @testing.provide_metadata def test_works_two(self): - # doesn't actually work with real FKs beacuse it creates conflicts :) + # doesn't actually work with real FKs because it creates conflicts :) self._fixture_one( add_b_a=True, add_b_a_overlaps="a_member", add_bsub1_a=True ) -- 2.47.3