From: Eric Hanchrow Date: Tue, 8 Aug 2023 23:00:57 +0000 (-0700) Subject: Replace `refers towards`, and similar constructions, with `... to` X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5d30e79c14fe78996d332fefd4bae36d76626ff4;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git Replace `refers towards`, and similar constructions, with `... to` --- diff --git a/doc/build/changelog/changelog_14.rst b/doc/build/changelog/changelog_14.rst index 90f0a66ccc..e4300f50b4 100644 --- a/doc/build/changelog/changelog_14.rst +++ b/doc/build/changelog/changelog_14.rst @@ -1721,7 +1721,7 @@ This document details individual issue-level changes made throughout :paramref:`.FunctionElement.table_valued.joins_implicitly`, for the :meth:`.FunctionElement.table_valued` construct. This parameter indicates that the given table-valued function implicitly joins to the table it - refers towards, essentially disabling the "from linting" feature, i.e. the + refers to, essentially disabling the "from linting" feature, i.e. the "cartesian product" warning, from taking effect due to the presence of this parameter. May be used for functions such as ``func.json_each()``. @@ -3993,7 +3993,7 @@ This document details individual issue-level changes made throughout :func:`_orm.relationship` that automap will be generating would emit the "overlaps" warnings introduced in 1.4 and discussed at :ref:`error_qzyx`. While generating this case from automap is still subject to the same - caveats that the "overlaps" warning refers towards, as automap is intended + caveats that the "overlaps" warning refers to, as automap is intended for more ad-hoc use cases, the condition which produces the warning is disabled when a many-to-many relationship with this particular pattern is generated. diff --git a/doc/build/changelog/migration_13.rst b/doc/build/changelog/migration_13.rst index 7703bc43e3..d6db988055 100644 --- a/doc/build/changelog/migration_13.rst +++ b/doc/build/changelog/migration_13.rst @@ -454,9 +454,9 @@ The :class:`.AssociationProxy` object makes lots of decisions based on the parent mapped class it is associated with. While the :class:`.AssociationProxy` historically began as a relatively simple "getter", it became apparent early on that it also needed to make decisions about what -kind of attribute it is referring towards, e.g. scalar or collection, mapped +kind of attribute it is referring to, e.g. scalar or collection, mapped object or simple value, and similar. To achieve this, it needs to inspect the -mapped attribute or other descriptor or attribute that it refers towards, as +mapped attribute or other descriptor or attribute that it refers to, as referenced from its parent class. However in Python descriptor mechanics, a descriptor only learns about its "parent" class when it is accessed in the context of that class, such as calling ``MyClass.some_descriptor``, which calls diff --git a/doc/build/errors.rst b/doc/build/errors.rst index 1a483e4193..531ff1af5a 100644 --- a/doc/build/errors.rst +++ b/doc/build/errors.rst @@ -783,7 +783,7 @@ Above, the SQL selects FROM the ``employee`` table, representing the ``Employee`` entity in the query. It then joins to a right-nested join of ``employee AS employee_1 JOIN manager AS manager_1``, where the ``employee`` table is stated again, except as an anonymous alias ``employee_1``. This is the -"automatic generation of an alias" that the warning message refers towards. +"automatic generation of an alias" that the warning message refers to. When SQLAlchemy loads ORM rows that each contain an ``Employee`` and a ``Manager`` object, the ORM must adapt rows from what above is the diff --git a/doc/build/orm/basic_relationships.rst b/doc/build/orm/basic_relationships.rst index 1cb483c314..914c587392 100644 --- a/doc/build/orm/basic_relationships.rst +++ b/doc/build/orm/basic_relationships.rst @@ -948,7 +948,7 @@ These string names are resolved into classes in the mapper resolution stage, which is an internal process that occurs typically after all mappings have been defined and is normally triggered by the first usage of the mappings themselves. The :class:`_orm.registry` object is the container in which -these names are stored and resolved to the mapped classes they refer towards. +these names are stored and resolved to the mapped classes they refer to. In addition to the main class argument for :func:`_orm.relationship`, other arguments which depend upon the columns present on an as-yet diff --git a/doc/build/orm/join_conditions.rst b/doc/build/orm/join_conditions.rst index 09c744e40a..67825ed7a6 100644 --- a/doc/build/orm/join_conditions.rst +++ b/doc/build/orm/join_conditions.rst @@ -428,7 +428,7 @@ composite key to ``Writer``. If we associate an ``Article`` with a particular ``Magazine``, but then associate the ``Article`` with a ``Writer`` that's associated with a *different* ``Magazine``, the ORM will overwrite ``Article.magazine_id`` non-deterministically, silently -changing which magazine we refer towards; it may +changing which magazine we refer to; it may also attempt to place NULL into this column if we de-associate a ``Writer`` from an ``Article``. The warning lets us know this is the case. diff --git a/doc/build/tutorial/metadata.rst b/doc/build/tutorial/metadata.rst index bddc9b17df..dc4dc01583 100644 --- a/doc/build/tutorial/metadata.rst +++ b/doc/build/tutorial/metadata.rst @@ -335,7 +335,7 @@ SQLAlchemy :class:`_orm.DeclarativeBase` class:: >>> class Base(DeclarativeBase): ... pass -Above, the ``Base`` class is what we'll refer towards as the Declarative Base. +Above, the ``Base`` class is what we'll refer to as the Declarative Base. When we make new classes that are subclasses of ``Base``, combined with appropriate class-level directives, they will each be established as a new **ORM mapped class** at class creation time, each one typically (but not diff --git a/lib/sqlalchemy/dialects/postgresql/base.py b/lib/sqlalchemy/dialects/postgresql/base.py index 233dce253a..b204935c59 100644 --- a/lib/sqlalchemy/dialects/postgresql/base.py +++ b/lib/sqlalchemy/dialects/postgresql/base.py @@ -1377,7 +1377,7 @@ Table Types passed to Functions ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ PostgreSQL supports passing a table as an argument to a function, which it -refers towards as a "record" type. SQLAlchemy :class:`_sql.FromClause` objects +refers to as a "record" type. SQLAlchemy :class:`_sql.FromClause` objects such as :class:`_schema.Table` support this special form using the :meth:`_sql.FromClause.table_valued` method, which is comparable to the :meth:`_functions.FunctionElement.table_valued` method except that the collection diff --git a/lib/sqlalchemy/engine/interfaces.py b/lib/sqlalchemy/engine/interfaces.py index c7db91000d..5ee3e208de 100644 --- a/lib/sqlalchemy/engine/interfaces.py +++ b/lib/sqlalchemy/engine/interfaces.py @@ -521,7 +521,7 @@ class ReflectedIndex(TypedDict): """index name""" column_names: List[Optional[str]] - """column names which the index refers towards. + """column names which the index refers to. An element of this list is ``None`` if it's an expression and is returned in the ``expressions`` list. """ diff --git a/lib/sqlalchemy/orm/mapper.py b/lib/sqlalchemy/orm/mapper.py index e78830e5bf..9008bfd8c5 100644 --- a/lib/sqlalchemy/orm/mapper.py +++ b/lib/sqlalchemy/orm/mapper.py @@ -965,7 +965,7 @@ class Mapper( local_table: FromClause """The immediate :class:`_expression.FromClause` which this - :class:`_orm.Mapper` refers towards. + :class:`_orm.Mapper` refers to. Typically is an instance of :class:`_schema.Table`, may be any :class:`.FromClause`. diff --git a/lib/sqlalchemy/sql/elements.py b/lib/sqlalchemy/sql/elements.py index 1c86c1669e..498ce955f4 100644 --- a/lib/sqlalchemy/sql/elements.py +++ b/lib/sqlalchemy/sql/elements.py @@ -4125,7 +4125,7 @@ class Over(ColumnElement[_T]): element: ColumnElement[_T] """The underlying expression object to which this :class:`.Over` - object refers towards.""" + object refers to.""" range_: Optional[typing_Tuple[int, int]]