]> git.ipfire.org Git - thirdparty/sqlalchemy/alembic.git/commitdiff
Spelling fixes (#1310)
authorJosh Soref <2119212+jsoref@users.noreply.github.com>
Mon, 11 Sep 2023 17:43:22 +0000 (13:43 -0400)
committerGitHub <noreply@github.com>
Mon, 11 Sep 2023 17:43:22 +0000 (19:43 +0200)
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
Co-authored-by: Federico Caselli <CaselIT@users.noreply.github.com>
20 files changed:
README.rst
alembic/config.py
alembic/op.pyi
alembic/operations/base.py
alembic/operations/ops.py
alembic/script/revision.py
docs/build/branches.rst
docs/build/changelog.rst
docs/build/cookbook.rst
docs/build/front.rst
docs/build/naming.rst
tests/test_autogen_composition.py
tests/test_autogen_diffs.py
tests/test_autogen_render.py
tests/test_batch.py
tests/test_config.py
tests/test_op.py
tests/test_oracle.py
tests/test_postgresql.py
tests/test_version_traversal.py

index 59c837151edc055241f8251894d028e338b17b35..478a7ba0e8e6f473450138d41ce231d0b9127a84 100644 (file)
@@ -65,7 +65,7 @@ The goals of Alembic are:
 * Provide a library of ALTER constructs that can be used by any SQLAlchemy
   application. The DDL constructs build upon SQLAlchemy's own DDLElement base
   and can be used standalone by any application or script.
-* At long last, bring SQLite and its inablity to ALTER things into the fold,
+* At long last, bring SQLite and its inability to ALTER things into the fold,
   but in such a way that SQLite's very special workflow needs are accommodated
   in an explicit way that makes the most of a bad situation, through the
   concept of a "batch" migration, where multiple changes to a table can
index 41e941b38b196a497c0a271329de4f02131ac4ac..55b5811a2c179933047774608340bcd65465720f 100644 (file)
@@ -34,7 +34,7 @@ class Config:
 
         some_param = context.config.get_main_option("my option")
 
-    When invoking Alembic programatically, a new
+    When invoking Alembic programmatically, a new
     :class:`.Config` can be created by passing
     the name of an .ini file to the constructor::
 
index 2bb16d813a327d74e5e913599e8c376218424bdf..d2721d829b4d918c1bc34bc8cad78c53bdbc3bb4 100644 (file)
@@ -197,7 +197,7 @@ def alter_column(
      don't otherwise specify a new type, as well as for
      when nullability is being changed on a SQL Server
      column.  It is also used if the type is a so-called
-     SQLlchemy "schema" type which may define a constraint (i.e.
+     SQLAlchemy "schema" type which may define a constraint (i.e.
      :class:`~sqlalchemy.types.Boolean`,
      :class:`~sqlalchemy.types.Enum`),
      so that the constraint can be dropped.
@@ -1080,7 +1080,7 @@ def execute(
         )
 
     Additionally, when passing the statement as a plain string, it is first
-    coerceed into a :func:`sqlalchemy.sql.expression.text` construct
+    coerced into a :func:`sqlalchemy.sql.expression.text` construct
     before being passed along.  In the less likely case that the
     literal SQL string contains a colon, it must be escaped with a
     backslash, as::
index 8b74dfd7e0f001cc02b2a34fdb6b54594a6bc81c..6a279ee63c24e9f545656a5ecfa8d82b7b7fdf87 100644 (file)
@@ -723,7 +723,7 @@ class Operations(AbstractOperations):
              don't otherwise specify a new type, as well as for
              when nullability is being changed on a SQL Server
              column.  It is also used if the type is a so-called
-             SQLlchemy "schema" type which may define a constraint (i.e.
+             SQLAlchemy "schema" type which may define a constraint (i.e.
              :class:`~sqlalchemy.types.Boolean`,
              :class:`~sqlalchemy.types.Enum`),
              so that the constraint can be dropped.
@@ -1489,7 +1489,7 @@ class Operations(AbstractOperations):
                 )
 
             Additionally, when passing the statement as a plain string, it is first
-            coerceed into a :func:`sqlalchemy.sql.expression.text` construct
+            coerced into a :func:`sqlalchemy.sql.expression.text` construct
             before being passed along.  In the less likely case that the
             literal SQL string contains a colon, it must be escaped with a
             backslash, as::
index 5f0b563289ce1ca028dea6532670d91853292d07..bef6e81f4a61ee92ca7b7d0f75acd3b14c639ac0 100644 (file)
@@ -1882,7 +1882,7 @@ class AlterColumnOp(AlterTableOp):
          don't otherwise specify a new type, as well as for
          when nullability is being changed on a SQL Server
          column.  It is also used if the type is a so-called
-         SQLlchemy "schema" type which may define a constraint (i.e.
+         SQLAlchemy "schema" type which may define a constraint (i.e.
          :class:`~sqlalchemy.types.Boolean`,
          :class:`~sqlalchemy.types.Enum`),
          so that the constraint can be dropped.
@@ -2490,7 +2490,7 @@ class ExecuteSQLOp(MigrateOperation):
             )
 
         Additionally, when passing the statement as a plain string, it is first
-        coerceed into a :func:`sqlalchemy.sql.expression.text` construct
+        coerced into a :func:`sqlalchemy.sql.expression.text` construct
         before being passed along.  In the less likely case that the
         literal SQL string contains a colon, it must be escaped with a
         backslash, as::
index 6c18e7aed842ab359c24f074d6f930b23b9164ff..aa0e9040f6e080781d1607a47a054814283de79d 100644 (file)
@@ -1090,13 +1090,13 @@ class RevisionMap:
     ) -> Tuple[Optional[str], Optional[_RevisionOrBase]]:
         """
         Parse downgrade command syntax :target to retrieve the target revision
-        and branch label (if any) given the :current_revisons stamp of the
+        and branch label (if any) given the :current_revisions stamp of the
         database.
 
         Returns a tuple (branch_label, target_revision) where branch_label
         is a string from the command specifying the branch to consider (or
         None if no branch given), and target_revision is a Revision object
-        which the command refers to. target_revsions is None if the command
+        which the command refers to. target_revisions is None if the command
         refers to 'base'. The target may be specified in absolute form, or
         relative to :current_revisions.
         """
@@ -1139,7 +1139,7 @@ class RevisionMap:
                         if not symbol_list:
                             # check the case where there are multiple branches
                             # but there is currently a single heads, since all
-                            # other branch heads are dependant of the current
+                            # other branch heads are dependent of the current
                             # single heads.
                             all_current = cast(
                                 Set[Revision], self._get_all_current(cr_tuple)
@@ -1206,7 +1206,7 @@ class RevisionMap:
     ) -> Tuple[Optional[_RevisionOrBase], ...]:
         """
         Parse upgrade command syntax :target to retrieve the target revision
-        and given the :current_revisons stamp of the database.
+        and given the :current_revisions stamp of the database.
 
         Returns a tuple of Revision objects which should be iterated/upgraded
         to. The target may be specified in absolute form, or relative to
index 0eed96d115f4ce6e09125573166f22ccf7b9ba44..4b74ca0b805bb0ca06ebb33786273d7ed542d27b 100644 (file)
@@ -4,7 +4,7 @@ Working with Branches
 =====================
 
 A **branch** describes a point in a migration stream when two or more
-versions refer to the same parent migration as their anscestor.  Branches
+versions refer to the same parent migration as their ancestor.  Branches
 occur naturally when two divergent source trees, both containing Alembic
 revision files created independently within those source trees, are merged
 together into one.  When this occurs, the challenge of a branch is to **merge** the
@@ -117,7 +117,7 @@ turn it into a "diamond" structure::
 
 We create the merge file using ``alembic merge``; with this command, we can
 pass to it an argument such as ``heads``, meaning we'd like to merge all
-heads.  Or, we can pass it individual revision numbers sequentally::
+heads.  Or, we can pass it individual revision numbers sequentially::
 
     $ alembic merge -m "merge ae1 and 27c" ae1027 27c6a
       Generating /path/to/foo/versions/53fffde5ad5_merge_ae1_and_27c.py ... done
@@ -392,7 +392,7 @@ However, when using branch labels, we usually want to use them using a syntax
 known as "branch at" syntax; this syntax allows us to state that we want to
 use a specific revision, let's say a "head" revision, in terms of a *specific*
 branch.  While normally, we can't refer to ``alembic upgrade head`` when
-there's multiple heads, we *can* refer to this head specifcally using
+there's multiple heads, we *can* refer to this head specifically using
 ``shoppingcart@head`` syntax::
 
     $ alembic upgrade shoppingcart@head
@@ -707,7 +707,7 @@ are descendants::
 What we see is that the full history of the ``networking`` branch, in terms
 of an "upgrade" to the "head", will include that the tree building
 up ``55af2cb1c267, add another account column``
-will be pulled in first.   Interstingly, we don't see this displayed
+will be pulled in first.   Interestingly, we don't see this displayed
 when we display history in the other direction, e.g. from ``networking@base``::
 
     $ alembic history -r networking@base:
index b72f33f7e24b570463e6a238881b7da3b0200134..4c8024c55a3a8bec5c30a6069f33b84724364a5c 100644 (file)
@@ -15,7 +15,7 @@ Changelog
         :tags: bug, operations
         :tickets: 1300
 
-        Added support for ``op.drop_constraint()`` to support PostrgreSQL
+        Added support for ``op.drop_constraint()`` to support PostgreSQL
         ``ExcludeConstraint`` objects, as well as other constraint-like objects
         that may be present in third party dialects, by resolving the ``type_``
         parameter to be ``None`` for this case.   Autogenerate has also been
@@ -25,7 +25,7 @@ Changelog
 
 
     .. change::
-        :tags: bug, commmands
+        :tags: bug, commands
         :tickets: 1299
 
         Fixed issue where the ``revision_environment`` directive in ``alembic.ini``
@@ -1072,7 +1072,7 @@ Changelog
         internally; instead, the state variables of each operation object will be
         used to produce the corresponding construct when the operation is invoked.
         The rationale is so that environments which make use of
-        operation-manipulation schemes such as those those discussed in
+        operation-manipulation schemes such as those discussed in
         :ref:`autogen_rewriter` are better supported, allowing end-user code to
         manipulate the public attributes of these objects which will then be
         expressed in the final output, an example is
@@ -1849,7 +1849,7 @@ Changelog
         unconditionally erase the version table before stamping anything.  This is
         useful for development where non-existent version identifiers might be left
         within the table.  Additionally, ``alembic.stamp`` now supports a list of
-        revision identifiers, which are intended to allow setting up muliple heads
+        revision identifiers, which are intended to allow setting up multiple heads
         at once.  Overall handling of version identifiers within the
         ``alembic.stamp`` command has been improved with many new tests and
         use cases added.
@@ -2114,7 +2114,7 @@ Changelog
         unconditionally, as in the vast majority of cases the server default is to
         be CURRENT_TIMESTAMP which may also be potentially bundled with an "ON
         UPDATE CURRENT_TIMESTAMP" directive, which SQLAlchemy does not currently
-        support as a distinct field.  The fix addiionally improves the server
+        support as a distinct field.  The fix additionally improves the server
         default comparison logic when the "ON UPDATE" clause is present and
         there are parenthesis to be adjusted for as is the case on some MariaDB
         versions.
@@ -2778,7 +2778,7 @@ Changelog
       in SQLAlchemy 1.1.  When the source column indicates autoincrement
       as True or "auto", the flag will render as True if the original column
       contextually indicates that it should have "autoincrement" keywords,
-      and when the source column explcitly sets it to False, this is also
+      and when the source column explicitly sets it to False, this is also
       rendered.  The behavior is intended to preserve the AUTO_INCREMENT flag
       on MySQL as the column is fully recreated on this backend.  Note that this
       flag does **not** support alteration of a column's "autoincrement" status,
@@ -3900,7 +3900,7 @@ Changelog
 
       Added a rule for Postgresql to not render a "drop unique" and "drop index"
       given the same name; for now it is assumed that the "index" is the
-      implicit one Postgreql generates.   Future integration with
+      implicit one PostgreSQL generates.   Future integration with
       new SQLAlchemy 1.0 features will improve this to be more
       resilient.
 
@@ -4784,7 +4784,7 @@ Changelog
         :tickets: 93
 
       Added :meth:`.Operations.create_primary_key`
-      operation, will genenerate an ADD CONSTRAINT
+      operation, will generate an ADD CONSTRAINT
       for a primary key.
 
     .. change::
index 0b59de97b14f9ef6d2f94395a25c0abc953047b1..510699a3e993011bcfe296222299c1940f6e41b6 100644 (file)
@@ -275,7 +275,7 @@ changes to them, we have to refer to the whole definition at once.
 If we need to add a new column to a view, for example, we have to drop
 it entirely and recreate it fresh with the extra column added, referring to
 the whole structure; but to make it even tougher, if we wish to support
-downgrade operarations in our migration scripts,
+downgrade operations in our migration scripts,
 we need to refer to the *previous* version of that
 construct fully, and we'd much rather not have to type out the whole
 definition in multiple places.
index 9ec8b7df97ddafbeff762c6d4adba2481f4bdfcf..2dba5b9549c402cf4031008f1a331f855a2ca2ef 100644 (file)
@@ -120,7 +120,7 @@ Alembic is developed by `Mike Bayer <http://techspot.zzzeek.org>`_, and is
 part of the SQLAlchemy_ project.
 
 User issues, discussion of potential bugs and features are most easily
-discussed using `Github Discussions <https://github.com/sqlalchemy/alembic/discussions/>`_.
+discussed using `GitHub Discussions <https://github.com/sqlalchemy/alembic/discussions/>`_.
 
 .. _bugs:
 
index 438374821775a6ae1761b04af16ca92782d9ab1b..55ccbde502b0015f177b512b01f1b4e16f645af8 100644 (file)
@@ -118,7 +118,7 @@ of ``unique=True`` and type out the whole constraint::
                 )
 
 There's a solution to all this naming work, which is to use an **automated
-naming convention**.  For some years, SQLAlchemy has encourgaged the use of
+naming convention**.  For some years, SQLAlchemy has encouraged the use of
 DDL Events in order to create naming schemes.  The :meth:`~sqlalchemy.events.DDLEvents.after_parent_attach`
 event in particular is the best place to intercept when :class:`~sqlalchemy.schema.Constraint`
 and :class:`~sqlalchemy.schema.Index` objects are being associated with a parent
index aac0c34619ec76eb7a7a7d5d76c5e60c9ac71ca4..b4b5bf33353bd848179436b867593e7a39eb494c 100644 (file)
@@ -227,7 +227,7 @@ nullable=True))
     # ### end Alembic commands ###""",  # noqa,
         )
 
-    def test_imports_maintined(self):
+    def test_imports_maintained(self):
         template_args = {}
         self.context.opts["render_as_batch"] = True
 
index d03771ee8f341f78d86c5227d7dde3d3586797ba..8a2cf9969283d85388a3650cb8368ba76bc1d38d 100644 (file)
@@ -237,7 +237,7 @@ class AutogenDefaultSchemaTest(AutogenFixtureTest, TestBase):
     __only_on__ = "postgresql"
     __backend__ = True
 
-    def test_uses_explcit_schema_in_default_one(self):
+    def test_uses_explicit_schema_in_default_one(self):
         default_schema = self.bind.dialect.default_schema_name
 
         m1 = MetaData()
@@ -249,7 +249,7 @@ class AutogenDefaultSchemaTest(AutogenFixtureTest, TestBase):
         diffs = self._fixture(m1, m2, include_schemas=True)
         eq_(diffs, [])
 
-    def test_uses_explcit_schema_in_default_two(self):
+    def test_uses_explicit_schema_in_default_two(self):
         default_schema = self.bind.dialect.default_schema_name
 
         m1 = MetaData()
@@ -265,7 +265,7 @@ class AutogenDefaultSchemaTest(AutogenFixtureTest, TestBase):
         eq_(diffs[0][1].schema, "test_schema")
         eq_(diffs[0][1].c.keys(), ["y"])
 
-    def test_uses_explcit_schema_in_default_three(self):
+    def test_uses_explicit_schema_in_default_three(self):
         default_schema = self.bind.dialect.default_schema_name
 
         m1 = MetaData()
index b00fdc1f3059a632de9f282763414cc93ef5f487..5c200b1fafc2cc05479c257cbf15e398139a93c4 100644 (file)
@@ -1094,7 +1094,7 @@ class AutogenRenderTest(TestBase):
 
     def test_render_add_column_system(self):
         # this would never actually happen since "system" columns
-        # can't be added in any case.   Howver it will render as
+        # can't be added in any case.   However it will render as
         # part of op.CreateTableOp.
         op_obj = ops.AddColumnOp("foo", Column("xmin", Integer, system=True))
         eq_ignore_whitespace(
@@ -2121,7 +2121,7 @@ class AutogenRenderTest(TestBase):
 
     @config.requirements.computed_columns_api
     @testing.combinations((True,), (False,))
-    def test_render_alter_column_computed_modify_default_perisisted(
+    def test_render_alter_column_computed_modify_default_persisted(
         self, persisted
     ):
         op_obj = ops.AlterColumnOp(
@@ -2137,7 +2137,7 @@ class AutogenRenderTest(TestBase):
 
     @config.requirements.computed_columns_api
     @testing.combinations((True,), (False,))
-    def test_render_alter_column_computed_existing_default_perisisted(
+    def test_render_alter_column_computed_existing_default_persisted(
         self, persisted
     ):
         c = sa.Computed("42", persisted=persisted)
index dd1c0089e935f0d881fd73baedfda074f048c04b..9992af2c6be371129f1ab9a440dc165ea0122a84 100644 (file)
@@ -794,7 +794,7 @@ class BatchApplyTest(TestBase):
         new_table = self._assert_impl(
             impl,
             colnames=["id", "email", "user_id"],
-            ddl_not_contains="CONSTRANT fk1",
+            ddl_not_contains="CONSTRAINT ufk",
         )
         eq_(list(new_table.foreign_keys), [])
 
index 9f3929a78abc39e7fe662cdec1b4bcf71597c5a1..73ce2aa94375f490ab0653f5a6754da47189165b 100644 (file)
@@ -102,7 +102,7 @@ class ConfigTest(TestBase):
         cfg.attributes["connection"] = m1
         eq_(cfg.attributes["connection"], m1)
 
-    def test_attributes_construtor(self):
+    def test_attributes_constructor(self):
         m1 = mock.Mock()
         m2 = mock.Mock()
         cfg = config.Config(attributes={"m1": m1})
index 403a94aaaba493a735577889b04c8db85d3a9d05..67d419478114bc73825524141ccdad4662925ca9 100644 (file)
@@ -1305,7 +1305,7 @@ class ObjectFromToTest(TestBase):
 
     As of #803 the constructs try to behave more intelligently
     about the state they were given, so that they can both "reverse"
-    themselves but also take into accout their current state.
+    themselves but also take into account their current state.
 
     """
 
index 3b6ddcac061b179fa824be1594b26891c03e36c7..83e039486c11e4e4922e6bd66461a0c643d60080 100644 (file)
@@ -35,7 +35,7 @@ class FullEnvironmentTests(TestBase):
     def teardown_class(cls):
         clear_staging_env()
 
-    def test_begin_comit(self):
+    def test_begin_commit(self):
         with capture_context_buffer(transactional_ddl=True) as buf:
             command.upgrade(self.cfg, self.a, sql=True)
         assert "SET TRANSACTION READ WRITE\n\n/" in buf.getvalue()
index 4b328e5501173161837d7ff9ba51bb2f3227917e..9a62c4f2d10df629c5cfaf9344def2759ae08abd 100644 (file)
@@ -797,7 +797,7 @@ class PostgresqlDefaultCompareTest(TestBase):
     def test_compare_unicode_literal(self):
         self._compare_default_roundtrip(String(), "im a default")
 
-    # TOOD: will need to actually eval() the repr() and
+    # TODO: will need to actually eval() the repr() and
     # spend more effort figuring out exactly the kind of expression
     # to use
     def _TODO_test_compare_character_str_w_singlequote(self):
index e1504b9cec752d17a739da9a6242373e9c868a01..0628f3fdf73e461025131d2f562fe1ccbbf8847d 100644 (file)
@@ -1331,7 +1331,7 @@ class MergedPathTest(MigrationTest):
             ([], self.c2.revision, self.e.revision),
         )
 
-    def test_stamp_labled_head_across_merge_from_multiple_branch(self):
+    def test_stamp_labeled_head_across_merge_from_multiple_branch(self):
         # this is testing that filter_for_lineage() checks for
         # d1 both in terms of "c2branch" as well as that the "head"
         # revision "f" is the head of both d1 and d2