]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
Fix various source comment/doc typos
authorluz paz <luzpaz@users.noreply.github.com>
Fri, 10 Dec 2021 14:10:29 +0000 (09:10 -0500)
committerFederico Caselli <cfederico87@gmail.com>
Wed, 29 Dec 2021 20:35:34 +0000 (21:35 +0100)
### Description
Found via `codespell -q 3 -L ba,crate,datas,froms,gord,hist,inh,nd,selectin,strat,ue`
Also added codespell to the pep8 tox env

### Checklist

This pull request is:

- [x] A documentation / typographical error fix
- Good to go, no issue or tests are needed

Closes: #7338
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/7338
Pull-request-sha: 0deac2219396bc0eba7da53eb3a80932edbf2dd7

Change-Id: Icd61db31c8dc655d4a39d8a304194804d08555fe

43 files changed:
doc/build/changelog/changelog_01.rst
doc/build/changelog/changelog_03.rst
doc/build/changelog/changelog_05.rst
doc/build/core/connections.rst
doc/build/core/metadata.rst
doc/build/errors.rst
doc/build/faq/connections.rst
doc/build/orm/extensions/asyncio.rst
doc/build/orm/mapped_sql_expr.rst
doc/build/tutorial/data_insert.rst
lib/sqlalchemy/dialects/postgresql/psycopg.py
lib/sqlalchemy/engine/base.py
lib/sqlalchemy/engine/cursor.py
lib/sqlalchemy/ext/mypy/util.py
lib/sqlalchemy/orm/path_registry.py
lib/sqlalchemy/orm/query.py
lib/sqlalchemy/orm/strategy_options.py
lib/sqlalchemy/pool/base.py
lib/sqlalchemy/sql/type_api.py
lib/sqlalchemy/util/langhelpers.py
setup.cfg
test/base/test_result.py
test/dialect/oracle/test_reflection.py
test/dialect/postgresql/test_dialect.py
test/dialect/postgresql/test_query.py
test/dialect/postgresql/test_types.py
test/dialect/test_sqlite.py
test/ext/declarative/test_inheritance.py
test/ext/test_baked.py
test/orm/inheritance/test_manytomany.py
test/orm/inheritance/test_relationship.py
test/orm/inheritance/test_single.py
test/orm/test_assorted_eager.py
test/orm/test_cascade.py
test/orm/test_core_compilation.py
test/orm/test_deferred.py
test/orm/test_deprecations.py
test/orm/test_expire.py
test/orm/test_joins.py
test/orm/test_mapper.py
test/orm/test_relationships.py
test/requirements.py
test/sql/test_operators.py

index cdffdc94378505a6a53c16d26b906310f6414443..2122c36f2db3cf65bfaf5a12e4f99dec82738cce 100644 (file)
         :tags: 
         :tickets: 
 
-      added assertion to tx = session.begin(); tx.rollback(); tx.begin(), i.e. cant
+      added assertion to tx = session.begin(); tx.rollback(); tx.begin(), i.e. can't
       use it after a rollback()
 
     .. change::
           executed on a primary key col so we know what we just inserted.
         * if you did add a row that has a bunch of database-side defaults on it,
           and the PassiveDefault thing was working the old way, i.e. they just execute on
-          the DB side, the "cant get the row back without an OID" exception that occurred
+          the DB side, the "can't get the row back without an OID" exception that occurred
           also will not happen unless someone (usually the ORM) explicitly asks for it.
 
     .. change::
         :tickets: 
 
       fix to postgres, where it will explicitly pre-execute a PassiveDefault on a table
-      if it is a primary key column, pursuant to the ongoing "we cant get inserted rows
+      if it is a primary key column, pursuant to the ongoing "we can't get inserted rows
       back from postgres" issue
 
     .. change::
index 1e34c0400a947113539cca64bfee66b4d736c4bd..f2ffb81e3d237e6d9c1c8cbadaa4b5a1e9bd8892 100644 (file)
         :tickets: 
 
       supports_sane_rowcount() set to False due to ticket #370.
-      versioned_id_col feature wont work in FB.
+      versioned_id_col feature won't work in FB.
 
     .. change::
         :tags: firebird
         :tags: sql
         :tickets: 
 
-      use_labels flag on select() wont auto-create labels for literal text
+      use_labels flag on select() won't auto-create labels for literal text
       column elements, since we can make no assumptions about the text. to
       create labels for literal columns, you can say "somecol AS
       somelabel", or use literal_column("somecol").label("somelabel")
         :tags: sql
         :tickets: 
 
-      quoting wont occur for literal columns when they are "proxied" into
+      quoting won't occur for literal columns when they are "proxied" into
       the column collection for their selectable (is_literal flag is
       propagated). literal columns are specified via
       literal_column("somestring").
       placed in the select statement by something other than the eager
       loader itself, to fix possibility of dupe columns as illustrated in. however, this means you have to be more careful with
       the columns placed in the "order by" of Query.select(), that you
-      have explicitly named them in your criterion (i.e. you cant rely on
+      have explicitly named them in your criterion (i.e. you can't rely on
       the eager loader adding them in for you)
 
     .. change::
         :tags: oracle
         :tickets: 363
 
-      issues a log warning when a related table cant be reflected due to
+      issues a log warning when a related table can't be reflected due to
       certain permission errors
 
     .. change::
         :tags: orm, bugs
         :tickets: 
 
-      eager relation to an inheriting mapper wont fail if no rows returned for
+      eager relation to an inheriting mapper won't fail if no rows returned for
       the relationship.
 
     .. change::
         :tags: orm
         :tickets: 346
 
-      session.flush() wont close a connection it opened
+      session.flush() won't close a connection it opened
 
     .. change::
         :tags: orm
index 493a680f6a6f4822829a9111a27835d35a441e00..e998cb4443b9c368321d5e250987b9963904a825 100644 (file)
         :tickets: 
 
       Wrote a docstring for Oracle dialect. Apparently that Ohloh
-      "few source code comments" label is starting to sting :).
+      "few source code comments" label is starting to string :).
 
     .. change::
         :tags: oracle
index 3de493686038f4fac2aa577a17b768360cc2027d..2e188e20e67ca159cccadf6f2fba2f7cfd918533 100644 (file)
@@ -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
index 909cfff4f80f4da40efd7bc840bb39cdbc98c132..60f3f8d16e949718b2d9a3600c7d46cf2c41b531 100644 (file)
@@ -311,7 +311,7 @@ schema names on a per-connection or per-statement basis.
     can be any number of "schemas" which then contain the actual table objects.
 
     A table within a specific schema is referred towards explicitly using the
-    syntax "<schemaname>.<tablename>".  Constrast this to an architecture such
+    syntax "<schemaname>.<tablename>".  Contrast this to an architecture such
     as that of MySQL, where there are only "databases", however SQL statements
     can refer to multiple databases at once, using the same syntax except it
     is "<database>.<tablename>".  On Oracle, this syntax refers to yet another
index 4845963b02f9edaa12204f750e86221a2e7b3f95..e2c703e4ccae5b0592edf76ee9a847a9e5eabc3c 100644 (file)
@@ -1470,7 +1470,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
index f8c4e5bcaad6791d622c6baa2e263381e2ab3c81..02d088384c0300fb063a03f5ce090dcbaf01284a 100644 (file)
@@ -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`,
index a7d2fb16be793581028684695affedcc6b228b76..4e48ab74ba4e1b0c44e86a71ecd99b0c88c824f4 100644 (file)
@@ -587,7 +587,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.
 
index eefd1d5d68594f41c6c8d3a72bee2a105a49ed8b..d9d675fd70601387f174371b3be79751e4d8089f 100644 (file)
@@ -356,7 +356,7 @@ The :func:`.query_expression` mapping has these caveats:
   query, such as the WHERE clause, the ORDER BY clause, and make use of the
   ad-hoc expression; that is, this won't work::
 
-    # wont work
+    # won't work
     q = session.query(A).options(
         with_expression(A.expr, A.x + A.y)
     ).filter(A.expr > 5).order_by(A.expr)
index 90180154b7d7a6a8e6a6425d3f91394c69b58feb..74b0aff56cfa5c8e17963b86619f5db423ed1b3c 100644 (file)
@@ -245,7 +245,7 @@ as in the example below that builds upon the example stated in
     which will be introduced later in this tutorial.
     The RETURNING feature is generally [1]_ only
     supported for statement executions that use a single set of bound
-    parameters; that is, it wont work with the "executemany" form introduced
+    parameters; that is, it won't work with the "executemany" form introduced
     at :ref:`tutorial_multiple_parameters`.    Additionally, some dialects
     such as the Oracle dialect only allow RETURNING to return a single row
     overall, meaning it won't work with "INSERT..FROM SELECT" nor will it
index 4219b4fff021634350684093b598e06ffaa9f8ea..911f461834724c6c54f30b87a0cb3b9290a6d4c1 100644 (file)
@@ -43,7 +43,7 @@ The asyncio version of the dialect may also be specified explicitly using the
     asyncio_engine = create_async_engine("postgresql+psycopg_async://scott:tiger@localhost/test")
 
 The ``psycopg`` dialect has the same API features as that of ``psycopg2``,
-with the exeption of the "fast executemany" helpers.   The "fast executemany"
+with the exception of the "fast executemany" helpers.   The "fast executemany"
 helpers are expected to be generalized and ported to ``psycopg`` before the final
 release of SQLAlchemy 2.0, however.
 
index b11ffd87149cd86ee7eac17cf9fc9ba4952c79a5..470cfb4496e06d398438b20ab5c4c4d5ad664a5a 100644 (file)
@@ -187,7 +187,7 @@ class Connection(ConnectionEventsTarget):
         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`
index 8247987fa0c27486f1490de65daca4d383658cc7..99a0b65edb412819dd82bc49e93660cd9cb0b598 100644 (file)
@@ -331,7 +331,7 @@ class CursorResultMetaData(ResultMetaData):
         as with textual non-ordered columns.
 
         The name-matched system of merging is the same as that used by
-        SQLAlchemy for all cases up through te 0.9 series.   Positional
+        SQLAlchemy for all cases up through the 0.9 series.   Positional
         matching for compiled SQL expressions was introduced in 1.0 as a
         major performance feature, and positional matching for textual
         :class:`_expression.TextualSelect` objects in 1.1.
index 4d55cb72833fe911de69f3fc78c00a728308fb47..0eefdb20fc3af7c8659306a60e01b3f46814da40 100644 (file)
@@ -245,7 +245,7 @@ def unbound_to_instance(
 
     # TODO: figure out a more robust way to check this.  The node is some
     # kind of _SpecialForm, there's a typing.Optional that's _SpecialForm,
-    # but I cant figure out how to get them to match up
+    # but I can't figure out how to get them to match up
     if typ.name == "Optional":
         # convert from "Optional?" to the more familiar
         # UnionType[..., NoneType()]
index f2768a6b664698d7492d07032331ec22f88f0aa7..7b04a798cac1e0d1184bbacf667ae2a3482d683d 100644 (file)
@@ -313,8 +313,8 @@ class TokenRegistry(PathRegistry):
     def __getitem__(self, entity):
         try:
             return self.path[entity]
-        except TypeError as te:
-            raise IndexError(f"{entity}") from te
+        except TypeError as err:
+            raise IndexError(f"{entity}") from err
 
 
 class PropRegistry(PathRegistry):
index a2e247f1474ee1b53c3e1e2c4f4150e2896e8908..018fb703dfc196f31bfcad3334b642f0e8c78400 100644 (file)
@@ -378,7 +378,7 @@ class Query(
         # it to provide a real expression object.
         #
         # from there, it starts to look much like Query itself won't be
-        # passed into the execute process and wont generate its own cache
+        # passed into the execute process and won't generate its own cache
         # key; this will all occur in terms of the ORM-enabled Select.
         if (
             not self._compile_options._set_base_alias
index 02068adce89877b350be9bc03680b14b49214279..6fcdfb27bfde9b52691e3a688a8d49eda33d3d91 100644 (file)
@@ -802,7 +802,7 @@ class _AbstractLoad(Generative, LoaderOption):
                         # scenario which should only be occurring in a loader
                         # that is against a non-aliased lead element with
                         # single path.  otherwise the
-                        # "B" wont match into the B(B, B2).
+                        # "B" won't match into the B(B, B2).
                         #
                         # i>=2 prevents this check from proceeding for
                         # the first path element.
index 77e4761e83d3421cb5f28328ed65980dd3dff849..984a497c71dafa5420c54739ab9f989bd99d3663 100644 (file)
@@ -792,7 +792,7 @@ class PoolProxiedConnection:
     pool.
 
     :class:`.PoolProxiedConnection` is basically the public-facing interface
-    for the :class:`._ConnectionFairy` implemenatation object, users familiar
+    for the :class:`._ConnectionFairy` implementation object, users familiar
     with :class:`._ConnectionFairy` can consider this object to be
     equivalent.
 
index cc226d7e371a9627940c7465d2e2609107aae1d0..9d9b91cad9c9dfd4b16eb0e12bb4a72d0feec957 100644 (file)
@@ -1742,7 +1742,7 @@ class TypeDecorator(ExternalType, 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.
 
index 52182a4f7c8181008b4b02d7b98fa83ac9a0aa21..361b350105654decc972458aa7a34e15523f56b9 100644 (file)
@@ -1894,8 +1894,8 @@ def inject_param_text(doctext, inject_params):
             lines.extend([line, to_inject, "\n"])
             to_inject = None
         elif line.endswith("::"):
-            # TODO: this still wont cover if the code example itself has blank
-            # lines in it, need to detect those via indentation.
+            # TODO: this still won't cover if the code example itself has
+            # blank lines in it, need to detect those via indentation.
             lines.extend([line, doclines.popleft()])
             continue
         lines.append(line)
index 80582f604e4b27fa4a27af38834ba61ce0a7aa3a..73303a8307657772179bc50de9f246ec256c6508 100644 (file)
--- a/setup.cfg
+++ b/setup.cfg
@@ -126,7 +126,6 @@ ignore_errors = True
 [mypy-sqlalchemy.ext.mypy.*]
 ignore_errors = False
 
-
 [sqla_testing]
 requirement_cls = test.requirements:DefaultRequirements
 profile_file = test/profiles.txt
index b31e886da7a34f9b9022a3e371518865a1c311df..8818ccb1456a9b8c89654f6022f1cfe66f5451b2 100644 (file)
@@ -524,7 +524,7 @@ class ResultTest(fixtures.TestBase):
 
     def test_one_unique(self):
         # assert that one() counts rows after uniqueness has been applied.
-        # this would raise if we didnt have unique
+        # this would raise if we didn't have unique
         result = self._fixture(data=[(1, 1, 1), (1, 1, 1)])
 
         row = result.unique().one()
@@ -541,7 +541,7 @@ class ResultTest(fixtures.TestBase):
 
     def test_one_unique_mapping(self):
         # assert that one() counts rows after uniqueness has been applied.
-        # this would raise if we didnt have unique
+        # this would raise if we didn't have unique
         result = self._fixture(data=[(1, 1, 1), (1, 1, 1)])
 
         row = result.mappings().unique().one()
index acf7d75d549785c4b3085948519ccf05263c2ac4..7dcd5bb1dc6dbf3de0df8826678e3eb0a3803e48 100644 (file)
@@ -74,7 +74,7 @@ class MultiSchemaTest(fixtures.TestBase, AssertsCompiledSQL):
 
     -- can't make a ref from local schema to the
     -- remote schema's table without this,
-    -- *and* cant give yourself a grant !
+    -- *and* can't give yourself a grant !
     -- so we give it to public.  ideas welcome.
     grant references on %(test_schema)s.parent to public;
     grant references on %(test_schema)s.child to public;
index 02d7ad483ec5b3ff82a536212600432b66786e41..57161e022909a85900e7631cdb24996b00adfbd5 100644 (file)
@@ -236,7 +236,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",
index fdce643f840f0ce9c48a28ef20679da1e2e4771e..4e6ca46c1ba569fce9f1a66932dd2586c9f48f70 100644 (file)
@@ -1649,7 +1649,7 @@ class TableValuedRoundTripTest(fixtures.TestBase):
         if cast_fn:
             value = cast_fn(value, JSON)
 
-        # why wont this work?!?!?
+        # why won't this work?!?!?
         # should be exactly json_to_recordset(to_json('string'::text))
         #
         fn = (
index 5f8a41d1f831ff8178dabd3de966f102f647803e..bcf43992b2088764d4010eae99dd1fd2b0f4a47d 100644 (file)
@@ -3375,7 +3375,7 @@ class _RangeTypeRoundTrip(fixtures.TablesTest):
 
             extras = psycopg_extras()
         else:
-            assert False, "Unknonw dialect"
+            assert False, "Unknown dialect"
         return extras
 
     @classmethod
index 141033c1b6b66c183c50e2e0f9412e3a8769bec8..37cdce344588886226463509cf44eec5dfcbbf13 100644 (file)
@@ -1892,7 +1892,7 @@ class ConstraintReflectionTest(fixtures.TestBase):
                 "REFERENCES implicit_referred_comp)"
             )
 
-            # worst case - FK that refers to nonexistent table so we cant
+            # worst case - FK that refers to nonexistent table so we can't
             # get pks.  requires FK pragma is turned off
             conn.exec_driver_sql(
                 "CREATE TABLE implicit_referrer_comp_fake "
index 34bee1d142521d14adbb33d5f0123016e348fdb5..64c32c76bd73919d14cf1075f79845a634071dbe 100644 (file)
@@ -254,7 +254,7 @@ class ConcreteInhTest(
                 "concrete": True,
             }
 
-        # didnt call configure_mappers() again
+        # didn't call configure_mappers() again
         assert_raises_message(
             orm_exc.UnmappedClassError,
             ".*and has a mapping pending",
index b3d6ebec2835c1bde63af4c3fc9dba37819135fc..ce051eadde0a21c448f428a80f7b72be4a92a99b 100644 (file)
@@ -280,12 +280,12 @@ class LikeQueryTest(BakedTest):
         # calling with *args
         eq_(bq(sess).params(uname="fred").count(), 1)
         # with multiple params, the **kwargs will be used
-        bq += lambda q: q.filter(User.id == bindparam("anid"))
-        eq_(bq(sess).params(uname="fred", anid=9).count(), 1)
+        bq += lambda q: q.filter(User.id == bindparam("an_id"))
+        eq_(bq(sess).params(uname="fred", an_id=9).count(), 1)
 
         eq_(
             # wrong id, so 0 results:
-            bq(sess).params(uname="fred", anid=8).count(),
+            bq(sess).params(uname="fred", an_id=8).count(),
             0,
         )
 
index e366a349cf1be077930260c1c4f7defa673e449e..a1305ac43defdc2c8653f2f567daf6f83f68bbc1 100644 (file)
@@ -231,7 +231,7 @@ class InheritTest3(fixtures.MappedTest):
     def define_tables(cls, metadata):
         global foo, bar, blub, bar_foo, blub_bar, blub_foo
 
-        # the 'data' columns are to appease SQLite which cant handle a blank
+        # the 'data' columns are to appease SQLite which can't handle a blank
         # INSERT
         foo = Table(
             "foo",
index fa66f90b8266a502de475899323c235b90b961b0..5db607b4548c370a11bc519a8914d92095b9f53b 100644 (file)
@@ -2388,7 +2388,7 @@ class JoinedloadOverWPolyAliased(
             cls is self.classes.Sub1
             and Link.child.entity.class_ is self.classes.Parent
         ):
-            # in 1.x we werent checking for this:
+            # in 1.x we weren't checking for this:
             # query(Sub1).options(
             #   joinedload(Sub1.links).joinedload(Link.child).joinedload(Sub1.links)
             # )
index 1b3c6db74da2f9b1ef0f484677db41b309eb3433..5c18cc49e4662832712b9cb1333d8db2023e7614 100644 (file)
@@ -597,8 +597,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)
 
index 61251ddafa79f3ac0bbb9fdb9304a6250794ec57..bf70868b6d1ac389e4f0f16e209246b00b6e2195 100644 (file)
@@ -777,7 +777,7 @@ class EagerTest5(fixtures.MappedTest):
         d2 = sess.get(DerivedII, "uid2")
         sess.expunge_all()
 
-        # object is not in the session; therefore the lazy load cant trigger
+        # object is not in the session; therefore the lazy load can't trigger
         # here, eager load had to succeed
         assert len([c for c in d2.comments]) == 1
 
index 51ed50255faf0df361e92778bc23226dd6fdf2ff..0bd1a6889c1460ebff17ddff7ec21d732ca48232 100644 (file)
@@ -2166,7 +2166,7 @@ class M2OCascadeDeleteOrphanTestTwo(fixtures.MappedTest):
         y = T3(data="T3a")
         x = T2(data="T2a", t3=y)
 
-        # cant attach the T3 to another T2
+        # can't attach the T3 to another T2
         assert_raises(sa_exc.InvalidRequestError, T2, data="T2b", t3=y)
 
         # set via backref tho is OK, unsets from previous parent
index 000a96a422a5d0fa24ca1120df219ead5865e0da..b93d26d4a1722fec4a9313bfbfb8f913e9da730c 100644 (file)
@@ -1073,7 +1073,7 @@ class ExtraColsTest(QueryTest, AssertsCompiledSQL):
         # the column properties
         stmt = select(stmt.subquery())
 
-        # TODO: shouldnt we be able to get to stmt.subquery().c.count ?
+        # TODO: shouldn't we be able to get to stmt.subquery().c.count ?
         self.assert_compile(
             stmt,
             "SELECT anon_2.anon_1, anon_2.anon_3, anon_2.id, anon_2.name "
index 0d7ccde90be3d3d94aa5ee1c3aa786f527e7daa5..db0033023d400228b338e35f0e0c70953bb0edbf 100644 (file)
@@ -1597,7 +1597,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()
index bae2a9707aab2f93c3139fff4f572119ca4ab477..b45ef02141cac8ea5bb0b2e01a7bbace86cc4dbd 100644 (file)
@@ -6633,4 +6633,4 @@ class Deferred_InheritanceTest(_deferred_InheritanceTest):
             "people.person_id = managers.person_id ORDER BY people.person_id",
         )
         # note this doesn't apply to "bound" loaders since they don't seem
-        # to have this ".*" featue.
+        # to have this ".*" feature.
index 3e3488d52681bcf2000c61323deac71c8714f4cb..58378956f26d198b520237fc9ec2651336152ff9 100644 (file)
@@ -1007,7 +1007,7 @@ class ExpireTest(_fixtures.FixtureTest):
         assert u.uname == "jack2"
         assert "name" in u.__dict__
 
-        # this wont work unless we add API hooks through the attr. system to
+        # this won't work unless we add API hooks through the attr. system to
         # provide "expire" behavior on a synonym
         #    sess.expire(u, ['uname'])
         #    users.update(users.c.id==7).execute(name='jack3')
index 58b09b67d781339edb3a20dd36caeb00133bc2e2..fa373f0e5a589a3b1065a72f7a5da4888b8b286d 100644 (file)
@@ -834,7 +834,7 @@ class JoinTest(QueryTest, AssertsCompiledSQL):
             use_default_dialect=True,
         )
 
-        # this fails (and we cant quite fix right now).
+        # this fails (and we can't quite fix right now).
         if False:
             self.assert_compile(
                 sess.query(User, ualias)
index b491604f30ebb0b323ad2fc1765d4b276e4995bc..a7888a2dd553290cda9360994da475a979543159 100644 (file)
@@ -920,7 +920,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
index 9ceaf4b6c8470f089f3e155074a54d065c40d8e2..f552995a9bdb8bb49a257df57cc6ea74dbb67ea0 100644 (file)
@@ -1035,7 +1035,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
         )
@@ -1668,7 +1668,7 @@ class FKsAsPksTest(fixtures.MappedTest):
             sess.commit()
 
     def test_no_delete_PK_AtoB(self):
-        """A cant be deleted without B because B would have no PK value."""
+        """A can't be deleted without B because B would have no PK value."""
 
         tableB, A, B, tableA = (
             self.tables.tableB,
@@ -1732,7 +1732,7 @@ class FKsAsPksTest(fixtures.MappedTest):
     def test_nullPKsOK_BtoA(self, metadata, connection):
         A, tableA = self.classes.A, self.tables.tableA
 
-        # postgresql cant handle a nullable PK column...?
+        # postgresql can't handle a nullable PK column...?
         tableC = Table(
             "tablec",
             metadata,
@@ -4722,7 +4722,7 @@ class SecondaryNestedJoinTest(
 
         # here, the "lazy" strategy has to ensure the "secondary"
         # table is part of the "select_from()", since it's a join().
-        # referring to just the columns wont actually render all those
+        # referring to just the columns won't actually render all those
         # join conditions.
         self.assert_sql_execution(
             testing.db,
index 3934dd23fc596e6edd55f005f942b38eac7a7b5e..e66443d1822b91bc764dd8383b0b3efa1f42614d 100644 (file)
@@ -472,7 +472,7 @@ class DefaultRequirements(SuiteRequirements):
         """
         return fails_if(
             self._mysql_not_mariadb_103,
-            'MySQL error 1093 "Cant specify target table '
+            "MySQL error 1093 \"Can't specify target table "
             'for update in FROM clause", resolved by MariaDB 10.3',
         )
 
@@ -649,7 +649,7 @@ class DefaultRequirements(SuiteRequirements):
 
     @property
     def dupe_order_by_ok(self):
-        """target db wont choke if ORDER BY specifies the same expression
+        """target db won't choke if ORDER BY specifies the same expression
         more than once
 
         """
index 9e47f217f2ba72e0d4e06f7d94cf1d819d88bae0..93b49bb7954e334c63b387de6540bdcf0e7e8278 100644 (file)
@@ -2700,7 +2700,7 @@ class MatchTest(fixtures.TestBase, testing.AssertsCompiledSQL):
         )
 
     def test_boolean_inversion_mysql(self):
-        # because mysql doesnt have native boolean
+        # because mysql doesn't have native boolean
         self.assert_compile(
             ~self.table1.c.myid.match("somstr"),
             "NOT MATCH (mytable.myid) AGAINST (%s IN BOOLEAN MODE)",
@@ -2708,7 +2708,7 @@ class MatchTest(fixtures.TestBase, testing.AssertsCompiledSQL):
         )
 
     def test_boolean_inversion_mssql(self):
-        # because mssql doesnt have native boolean
+        # because mssql doesn't have native boolean
         self.assert_compile(
             ~self.table1.c.myid.match("somstr"),
             "NOT CONTAINS (mytable.myid, :myid_1)",