From 7e588aadaab27a53b226a4637be9b4022ab46956 Mon Sep 17 00:00:00 2001 From: Min ho Kim Date: Sun, 21 Jul 2019 10:51:29 +1000 Subject: [PATCH] Fix typos --- doc/build/changelog/changelog_13.rst | 12 ++++++------ doc/build/changelog/migration_06.rst | 2 +- doc/build/changelog/migration_13.rst | 2 +- doc/build/changelog/unreleased_13/4624.rst | 2 +- doc/build/core/tutorial.rst | 2 +- doc/build/orm/extensions/associationproxy.rst | 2 +- doc/build/orm/inheritance.rst | 2 +- doc/build/orm/loading_relationships.rst | 2 +- examples/space_invaders/space_invaders.py | 4 ++-- examples/versioned_history/history_meta.py | 2 +- lib/sqlalchemy/orm/collections.py | 2 +- lib/sqlalchemy/orm/persistence.py | 2 +- lib/sqlalchemy/orm/relationships.py | 2 +- lib/sqlalchemy/orm/strategies.py | 2 +- lib/sqlalchemy/orm/strategy_options.py | 2 +- lib/sqlalchemy/sql/compiler.py | 2 +- lib/sqlalchemy/sql/schema.py | 2 +- lib/sqlalchemy/sql/selectable.py | 2 +- lib/sqlalchemy/sql/sqltypes.py | 2 +- test/aaa_profiling/test_memusage.py | 2 +- test/dialect/mssql/test_types.py | 2 +- test/orm/test_froms.py | 2 +- test/orm/test_relationships.py | 2 +- test/orm/test_unitofwork.py | 2 +- test/sql/test_insert_exec.py | 2 +- test/sql/test_selectable.py | 4 ++-- 26 files changed, 33 insertions(+), 33 deletions(-) diff --git a/doc/build/changelog/changelog_13.rst b/doc/build/changelog/changelog_13.rst index 384e8b348a..55ec00f630 100644 --- a/doc/build/changelog/changelog_13.rst +++ b/doc/build/changelog/changelog_13.rst @@ -33,7 +33,7 @@ two levels deep, in conjunction with modification to primary key values, where those primary key columns are also linked together in a foreign key relationship as is typical for joined table inheritance. The intermediary - table in a three-level inheritance hierachy will now get its UPDATE if + table in a three-level inheritance hierarchy will now get its UPDATE if only the primary key value has changed and passive_updates=False (e.g. foreign key constraints not being enforced), whereas before it would be skipped; similarly, with passive_updates=True (e.g. ON UPDATE CASCADE in @@ -190,7 +190,7 @@ hybrid attributes when they made use of the ``@hybrid_property.expression`` decorator to return an alternate SQL expression, or when the hybrid returned an arbitrary :class:`.PropComparator`, at the expression level. - This involved futher generalization of the heuristics used to detect the + This involved further generalization of the heuristics used to detect the type of object being proxied at the level of :class:`.QueryableAttribute`, to better detect if the descriptor ultimately serves mapped classes or column expressions. @@ -765,10 +765,10 @@ :tickets: 4446 Fixed issue in association proxy due to :ticket:`3423` which caused the use - of custom :class:`.PropComparator` objects with hybrid attribites, such as + of custom :class:`.PropComparator` objects with hybrid attributes, such as the one demonstrated in the ``dictlike-polymorphic`` example to not function within an association proxy. The strictness that was added in - :ticket:`3423` has been relaxed, and additional logic to accomodate for + :ticket:`3423` has been relaxed, and additional logic to accommodate for an association proxy that links to a custom hybrid have been added. .. change:: @@ -870,7 +870,7 @@ Reworked :class:`.AssociationProxy` to store state that's specific to a parent class in a separate object, so that a single - :class:`.AssocationProxy` can serve for multiple parent classes, as is + :class:`.AssociationProxy` can serve for multiple parent classes, as is intrinsic to inheritance, without any ambiguity in the state returned by it. A new method :meth:`.AssociationProxy.for_class` is added to allow inspection of class-specific state. @@ -1173,7 +1173,7 @@ Fixed bug where declarative would not update the state of the :class:`.Mapper` as far as what attributes were present, when additional attributes were added or removed after the mapper attribute collections had - already been called and memoized. Addtionally, a ``NotImplementedError`` + already been called and memoized. Additionally, a ``NotImplementedError`` is now raised if a fully mapped attribute (e.g. column, relationship, etc.) is deleted from a class that is currently mapped, since the mapper will not function correctly if the attribute has been removed. diff --git a/doc/build/changelog/migration_06.rst b/doc/build/changelog/migration_06.rst index 28a74b9e8f..7024f25b69 100644 --- a/doc/build/changelog/migration_06.rst +++ b/doc/build/changelog/migration_06.rst @@ -640,7 +640,7 @@ feature can be disabled by specifying Type System Changes =================== -New Archicture +New Architecture -------------- The type system has been completely reworked behind the diff --git a/doc/build/changelog/migration_13.rst b/doc/build/changelog/migration_13.rst index 15e67fdd51..b749f56230 100644 --- a/doc/build/changelog/migration_13.rst +++ b/doc/build/changelog/migration_13.rst @@ -419,7 +419,7 @@ Given a mapping as:: a_id = Column(Integer, ForeignKey(A.id), primary_key=True) b_id = Column(Integer, ForeignKey(B.id), primary_key=True) -An assigment to ``A.b`` will generate an ``AB`` object:: +An assignment to ``A.b`` will generate an ``AB`` object:: a.b = B() diff --git a/doc/build/changelog/unreleased_13/4624.rst b/doc/build/changelog/unreleased_13/4624.rst index 4e8fc4921f..bd9236a2ef 100644 --- a/doc/build/changelog/unreleased_13/4624.rst +++ b/doc/build/changelog/unreleased_13/4624.rst @@ -5,6 +5,6 @@ Enhanced MySQL/MariaDB version string parsing to accommodate for exotic MariaDB version strings where the "MariaDB" word is embedded among other alphanumeric characters such as "MariaDBV1". This detection is critical in - order to correctly accomodate for API features that have split between MySQL + order to correctly accommodate for API features that have split between MySQL and MariaDB such as the "transaction_isolation" system variable. diff --git a/doc/build/core/tutorial.rst b/doc/build/core/tutorial.rst index 6e389518d0..31c2f78017 100644 --- a/doc/build/core/tutorial.rst +++ b/doc/build/core/tutorial.rst @@ -1534,7 +1534,7 @@ another function :func:`.type_coerce` which is closely related to :func:`.cast`, in that it sets up a Python expression as having a specific SQL database type, but does not render the ``CAST`` keyword or datatype on the database side. :func:`.type_coerce` is particularly important when dealing -with the :class:`.types.JSON` datatype, which typicaly has an intricate +with the :class:`.types.JSON` datatype, which typically has an intricate relationship with string-oriented datatypes on different platforms and may not even be an explicit datatype, such as on SQLite and MariaDB. Below, we use :func:`.type_coerce` to deliver a Python structure as a JSON diff --git a/doc/build/orm/extensions/associationproxy.rst b/doc/build/orm/extensions/associationproxy.rst index 5670a787df..8e699efa96 100644 --- a/doc/build/orm/extensions/associationproxy.rst +++ b/doc/build/orm/extensions/associationproxy.rst @@ -524,7 +524,7 @@ Given a mapping as:: a_id = Column(Integer, ForeignKey(A.id), primary_key=True) b_id = Column(Integer, ForeignKey(B.id), primary_key=True) -An assigment to ``A.b`` will generate an ``AB`` object:: +An assignment to ``A.b`` will generate an ``AB`` object:: a.b = B() diff --git a/doc/build/orm/inheritance.rst b/doc/build/orm/inheritance.rst index cd796f7a77..c8f372e285 100644 --- a/doc/build/orm/inheritance.rst +++ b/doc/build/orm/inheritance.rst @@ -730,7 +730,7 @@ the :paramref:`.mapper.with_polymorphic` parameter:: 'polymorphic_identity': 'manager', 'concrete': True} -Alternatvely, the same :class:`.Table` objects can be used in +Alternatively, the same :class:`.Table` objects can be used in fully "classical" style, without using Declarative at all. A constructor similar to that supplied by Declarative is illustrated:: diff --git a/doc/build/orm/loading_relationships.rst b/doc/build/orm/loading_relationships.rst index 5acdeaf145..cf64833e60 100644 --- a/doc/build/orm/loading_relationships.rst +++ b/doc/build/orm/loading_relationships.rst @@ -72,7 +72,7 @@ Configuring Loader Strategies at Mapping Time The loader strategy for a particular relationship can be configured at mapping time to take place in all cases where an object of the mapped -type is loaded, in the absense of any query-level options that modify it. +type is loaded, in the absence of any query-level options that modify it. This is configured using the :paramref:`.relationship.lazy` parameter to :func:`.relationship`; common values for this parameter include ``select``, ``joined``, ``subquery`` and ``selectin``. diff --git a/examples/space_invaders/space_invaders.py b/examples/space_invaders/space_invaders.py index 34d233da18..ed6c47abc0 100644 --- a/examples/space_invaders/space_invaders.py +++ b/examples/space_invaders/space_invaders.py @@ -656,14 +656,14 @@ def move_missile(session, window, state): ) missile.blank(window) if glyph or missile.top_bound: - # missle is done + # missile is done session.delete(missile) state["missile"] = None if glyph: # score! score(session, window, state, glyph) else: - # move missle up one character. + # move missile up one character. missile.y -= 1 diff --git a/examples/versioned_history/history_meta.py b/examples/versioned_history/history_meta.py index 2a331443d7..22b019bd70 100644 --- a/examples/versioned_history/history_meta.py +++ b/examples/versioned_history/history_meta.py @@ -182,7 +182,7 @@ class Versioned(object): __table_args__ = {"sqlite_autoincrement": True} """Use sqlite_autoincrement, to ensure unique integer values - are used for new rows even for rows taht have been deleted.""" + are used for new rows even for rows that have been deleted.""" def versioned_objects(iter_): diff --git a/lib/sqlalchemy/orm/collections.py b/lib/sqlalchemy/orm/collections.py index 1f50c7b091..ae96a8c4da 100644 --- a/lib/sqlalchemy/orm/collections.py +++ b/lib/sqlalchemy/orm/collections.py @@ -656,7 +656,7 @@ class CollectionAdapter(object): def _set_empty(self, user_data): assert ( not self.empty - ), "This collection adapter is alreay in the 'empty' state" + ), "This collection adapter is already in the 'empty' state" self.empty = True self.owner_state._empty_collections[self._key] = user_data diff --git a/lib/sqlalchemy/orm/persistence.py b/lib/sqlalchemy/orm/persistence.py index 072d34f8c8..fb25d2405f 100644 --- a/lib/sqlalchemy/orm/persistence.py +++ b/lib/sqlalchemy/orm/persistence.py @@ -738,7 +738,7 @@ def _collect_update_commands( # have changed the primary key of the row; propagate this event to # other columns that expect to have been modified. this normally # occurs after the UPDATE is emitted however we invoke it here - # explicitly in the absense of our invoking an UPDATE + # explicitly in the absence of our invoking an UPDATE for m, equated_pairs in mapper._table_to_equated[table]: sync.populate( state, diff --git a/lib/sqlalchemy/orm/relationships.py b/lib/sqlalchemy/orm/relationships.py index 6b3107f595..46eec75eb9 100644 --- a/lib/sqlalchemy/orm/relationships.py +++ b/lib/sqlalchemy/orm/relationships.py @@ -1665,7 +1665,7 @@ class RelationshipProperty(StrategizedProperty): # for a full merge, pre-load the destination collection, # so that individual _merge of each item pulls from identity # map for those already present. - # also assumes CollectionAttrbiuteImpl behavior of loading + # also assumes CollectionAttributeImpl behavior of loading # "old" list in any case dest_state.get_impl(self.key).get(dest_state, dest_dict) diff --git a/lib/sqlalchemy/orm/strategies.py b/lib/sqlalchemy/orm/strategies.py index 65e4e61d26..82f40ea3ba 100644 --- a/lib/sqlalchemy/orm/strategies.py +++ b/lib/sqlalchemy/orm/strategies.py @@ -2294,7 +2294,7 @@ class SelectInLoader(AbstractRelationshipLoader, util.MemoizedSlots): if not query_info.load_with_join: # the Bundle we have in the "omit_join" case is against raw, non # annotated columns, so to ensure the Query knows its primary - # entity, we add it explictly. If we made the Bundle against + # entity, we add it explicitly. If we made the Bundle against # annotated columns, we hit a performance issue in this specific # case, which is detailed in issue #4347. q.add_criteria(lambda q: q.select_from(effective_entity)) diff --git a/lib/sqlalchemy/orm/strategy_options.py b/lib/sqlalchemy/orm/strategy_options.py index 5ae60e8549..df7dd51a88 100644 --- a/lib/sqlalchemy/orm/strategy_options.py +++ b/lib/sqlalchemy/orm/strategy_options.py @@ -243,7 +243,7 @@ class Load(Generative, MapperOption): elif _is_mapped_class(attr): # TODO: this does not appear to be a valid codepath. "attr" # would never be a mapper. This block is present in 1.2 - # as well howver does not seem to be accessed in any tests. + # as well however does not seem to be accessed in any tests. if not orm_util._entity_corresponds_to_use_path_impl( attr.parent, path[-1] ): diff --git a/lib/sqlalchemy/sql/compiler.py b/lib/sqlalchemy/sql/compiler.py index 740abeb3d7..400ac2749c 100644 --- a/lib/sqlalchemy/sql/compiler.py +++ b/lib/sqlalchemy/sql/compiler.py @@ -3498,7 +3498,7 @@ class IdentifierPreparer(object): """keyword sequence filter. a filter for elements that are intended to represent keyword sequences, - such as "INITIALLY", "INTIALLY DEFERRED", etc. no special characters + such as "INITIALLY", "INITIALLY DEFERRED", etc. no special characters should be present. .. versionadded:: 1.3 diff --git a/lib/sqlalchemy/sql/schema.py b/lib/sqlalchemy/sql/schema.py index 23c58dc4e6..c84e3ee214 100644 --- a/lib/sqlalchemy/sql/schema.py +++ b/lib/sqlalchemy/sql/schema.py @@ -3777,7 +3777,7 @@ class MetaData(SchemaItem): .. note:: - As refered above, the :paramref:`.MetaData.schema` parameter + As referred above, the :paramref:`.MetaData.schema` parameter only refers to the **default value** that will be applied to the :paramref:`.Table.schema` parameter of an incoming :class:`.Table` object. It does not refer to how the diff --git a/lib/sqlalchemy/sql/selectable.py b/lib/sqlalchemy/sql/selectable.py index 10643c9e46..03dbcd449a 100644 --- a/lib/sqlalchemy/sql/selectable.py +++ b/lib/sqlalchemy/sql/selectable.py @@ -2976,7 +2976,7 @@ class CompoundSelect(GenerativeSelect): For a :class:`.CompoundSelect`, the :attr:`.CompoundSelect.selected_columns` attribute returns the selected - columns of the first SELECT statement contined within the series of + columns of the first SELECT statement contained within the series of statements within the set operation. .. versionadded:: 1.4 diff --git a/lib/sqlalchemy/sql/sqltypes.py b/lib/sqlalchemy/sql/sqltypes.py index 7c7f2ac52a..38731fcbe5 100644 --- a/lib/sqlalchemy/sql/sqltypes.py +++ b/lib/sqlalchemy/sql/sqltypes.py @@ -48,7 +48,7 @@ class _LookupExpressionAdapter(object): """Mixin expression adaptations based on lookup tables. - These rules are currenly used by the numeric, integer and date types + These rules are currently used by the numeric, integer and date types which have detailed cross-expression coercion rules. """ diff --git a/test/aaa_profiling/test_memusage.py b/test/aaa_profiling/test_memusage.py index 156d480441..56d8b4ff88 100644 --- a/test/aaa_profiling/test_memusage.py +++ b/test/aaa_profiling/test_memusage.py @@ -958,7 +958,7 @@ class MemUsageWBackendTest(EnsureZeroed): go() - # fails on newer versions of pysqlite due to unusual memory behvior + # fails on newer versions of pysqlite due to unusual memory behavior # in pysqlite itself. background at: # http://thread.gmane.org/gmane.comp.python.db.pysqlite.user/2290 diff --git a/test/dialect/mssql/test_types.py b/test/dialect/mssql/test_types.py index 54dd6876a4..f88eb928ca 100644 --- a/test/dialect/mssql/test_types.py +++ b/test/dialect/mssql/test_types.py @@ -560,7 +560,7 @@ class TypeRoundTripTest( "1234.58965E-2", "1.521E+15", # previously, these were at -1E-25, which were inserted - # cleanly howver we only got back 20 digits of accuracy. + # cleanly however we only got back 20 digits of accuracy. # pyodbc as of 4.0.22 now disallows the silent truncation. "-1E-20", "1E-20", diff --git a/test/orm/test_froms.py b/test/orm/test_froms.py index 774f335f70..498b680577 100644 --- a/test/orm/test_froms.py +++ b/test/orm/test_froms.py @@ -2461,7 +2461,7 @@ class MixedEntitiesTest(QueryTest, AssertsCompiledSQL): "WHERE addresses.email_address > :email_address_1", ) - # second, 'email_address' matches up to the aggreagte, and we get a + # second, 'email_address' matches up to the aggregate, and we get a # smooth JOIN from users->subquery and that's it self.assert_compile( sess.query(User, ag2.email_address) diff --git a/test/orm/test_relationships.py b/test/orm/test_relationships.py index b01c5a805d..e9417957d2 100644 --- a/test/orm/test_relationships.py +++ b/test/orm/test_relationships.py @@ -744,7 +744,7 @@ class OverlappingFksSiblingTest(fixtures.TestBase): bsub2.a = a2 session.commit() - assert bsub1.a is a2 # beacuse bsub1.a_member is not a relationship + assert bsub1.a is a2 # because bsub1.a_member is not a relationship assert bsub2.a is a1 # because bsub2.a is viewonly=True # everyone has a B.a relationship diff --git a/test/orm/test_unitofwork.py b/test/orm/test_unitofwork.py index f23a934e1e..13c5907a4f 100644 --- a/test/orm/test_unitofwork.py +++ b/test/orm/test_unitofwork.py @@ -1132,7 +1132,7 @@ class DefaultTest(fixtures.MappedTest): eq_(h3.hoho, althohoval) def go(): - # test deferred load of attribues, one select per instance + # test deferred load of attributes, one select per instance self.assert_(h2.hoho == h4.hoho == h5.hoho == hohoval) self.sql_count_(3, go) diff --git a/test/sql/test_insert_exec.py b/test/sql/test_insert_exec.py index 7905dc4bc9..85cdeca4b2 100644 --- a/test/sql/test_insert_exec.py +++ b/test/sql/test_insert_exec.py @@ -263,7 +263,7 @@ class InsertExecTest(fixtures.TablesTest): eq_(r.inserted_primary_key, [0]) @testing.fails_on( - "sqlite", "sqlite autoincremnt doesn't work with composite pks" + "sqlite", "sqlite autoincrement doesn't work with composite pks" ) @testing.provide_metadata def test_misordered_lastrow(self): diff --git a/test/sql/test_selectable.py b/test/sql/test_selectable.py index 9bcdd0620e..dfd35908bd 100644 --- a/test/sql/test_selectable.py +++ b/test/sql/test_selectable.py @@ -265,7 +265,7 @@ class SelectableTest( s = select([t, expr]) - # anon_label, e.g. a truncated_label, is used here becuase + # anon_label, e.g. a truncated_label, is used here because # the expr has no name, no key, and myop() can't create a # string, so this is the last resort eq_(s.selected_columns.keys(), ["x", "y", expr.anon_label]) @@ -456,7 +456,7 @@ class SelectableTest( # TODO: this case is crazy, sending SELECT or FROMCLAUSE has to # be figured out - is it a scalar row query? what kinds of - # statements go into functions in PG. seems likely select statment, + # statements go into functions in PG. seems likely select statement, # but not alias, subquery or other FROM object self.assert_compile( select([func.foo(a)]), -- 2.47.2