From 190a72a2c29a56f6d0d12ec7ab8b5b9fbf838b58 Mon Sep 17 00:00:00 2001 From: aplatkouski <5857672+aplatkouski@users.noreply.github.com> Date: Tue, 16 Jun 2020 21:26:36 +0300 Subject: [PATCH] Fix typos in 'Engine and Connection Use' Signed-off-by: aplatkouski <5857672+aplatkouski@users.noreply.github.com> --- doc/build/changelog/migration_14.rst | 2 +- doc/build/core/connections.rst | 2 +- lib/sqlalchemy/engine/base.py | 4 ++-- lib/sqlalchemy/engine/cursor.py | 2 +- lib/sqlalchemy/engine/interfaces.py | 2 +- lib/sqlalchemy/engine/result.py | 4 ++-- lib/sqlalchemy/engine/url.py | 2 +- lib/sqlalchemy/event/base.py | 2 +- 8 files changed, 10 insertions(+), 10 deletions(-) diff --git a/doc/build/changelog/migration_14.rst b/doc/build/changelog/migration_14.rst index 3314e8d9b6..ba929911d2 100644 --- a/doc/build/changelog/migration_14.rst +++ b/doc/build/changelog/migration_14.rst @@ -1540,7 +1540,7 @@ The behavior was first introduced in 0.9 and was part of the larger change of allowing for right nested joins as described at :ref:`feature_joins_09`. However the SQLite workaround produced many regressions in the 2013-2014 period due to its complexity. In 2016, the dialect was modified so that the -join rewriting logic would only occur for SQLite verisons prior to 3.7.16 after +join rewriting logic would only occur for SQLite versions prior to 3.7.16 after bisection was used to identify where SQLite fixed its support for this construct, and no further issues were reported against the behavior (even though some bugs were found internally). It is now anticipated that there diff --git a/doc/build/core/connections.rst b/doc/build/core/connections.rst index 7869e61223..976ac27e14 100644 --- a/doc/build/core/connections.rst +++ b/doc/build/core/connections.rst @@ -492,7 +492,7 @@ The introduction on using :meth:`_engine.Connection.execute` made use of the :func:`_expression.text` construct in order to illustrate how textual SQL statements may be invoked. When working with SQLAlchemy, textual SQL is actually more of the exception rather than the norm, as the Core expression language -and the ORM both abstract away the textual representation of SQL. Hpwever, the +and the ORM both abstract away the textual representation of SQL. However, the :func:`_expression.text` construct itself also provides some abstraction of textual SQL in that it normalizes how bound parameters are passed, as well as that it supports datatyping behavior for parameters and result set rows. diff --git a/lib/sqlalchemy/engine/base.py b/lib/sqlalchemy/engine/base.py index e7eec87962..aec1095795 100644 --- a/lib/sqlalchemy/engine/base.py +++ b/lib/sqlalchemy/engine/base.py @@ -42,7 +42,7 @@ class Connection(Connectable): possible that the underlying DBAPI connection may not support shared access between threads. Check the DBAPI documentation for details. - The Connection object represents a single dbapi connection checked out + The Connection object represents a single DBAPI connection checked out from the connection pool. In this state, the connection pool has no affect upon the connection, including its expiration or timeout state. For the connection pool to properly manage connections, connections should be @@ -117,7 +117,7 @@ class Connection(Connectable): return self._execution_options.get("schema_translate_map", None) def schema_for_object(self, obj): - """return the schema name for the given schema item taking into + """Return the schema name for the given schema item taking into account current schema translate map. """ diff --git a/lib/sqlalchemy/engine/cursor.py b/lib/sqlalchemy/engine/cursor.py index 3c672020bd..19267b0b83 100644 --- a/lib/sqlalchemy/engine/cursor.py +++ b/lib/sqlalchemy/engine/cursor.py @@ -1534,7 +1534,7 @@ class BaseCursorResult(object): @property def lastrowid(self): - """return the 'lastrowid' accessor on the DBAPI cursor. + """Return the 'lastrowid' accessor on the DBAPI cursor. This is a DBAPI specific method and is only functional for those backends which support it, for statements diff --git a/lib/sqlalchemy/engine/interfaces.py b/lib/sqlalchemy/engine/interfaces.py index 76d6b889e1..a39c2e296b 100644 --- a/lib/sqlalchemy/engine/interfaces.py +++ b/lib/sqlalchemy/engine/interfaces.py @@ -446,7 +446,7 @@ class Dialect(object): """Check the existence of a particular index name in the database. Given a :class:`_engine.Connection` object, a string - `table_name` and stiring index name, return True if an index of the + `table_name` and string index name, return True if an index of the given name on the given table exists, false otherwise. The :class:`.DefaultDialect` implements this in terms of the diff --git a/lib/sqlalchemy/engine/result.py b/lib/sqlalchemy/engine/result.py index b29bc22d44..e19d4ad371 100644 --- a/lib/sqlalchemy/engine/result.py +++ b/lib/sqlalchemy/engine/result.py @@ -891,7 +891,7 @@ class Result(InPlaceGenerative): None and the ending value. Prefer to use iterative / collection methods which support scalar None values. - this method is provided for backwards compatibility with + This method is provided for backwards compatibility with SQLAlchemy 1.x.x. To fetch the first row of a result only, use the @@ -921,7 +921,7 @@ class Result(InPlaceGenerative): When all rows are exhausted, returns an empty list. - this method is provided for backwards compatibility with + This method is provided for backwards compatibility with SQLAlchemy 1.x.x. To fetch rows in groups, use the :meth:`._result.Result.partitions` diff --git a/lib/sqlalchemy/engine/url.py b/lib/sqlalchemy/engine/url.py index 7b7a0047ce..f0685d9e33 100644 --- a/lib/sqlalchemy/engine/url.py +++ b/lib/sqlalchemy/engine/url.py @@ -29,7 +29,7 @@ class URL(object): This object is suitable to be passed directly to a :func:`~sqlalchemy.create_engine` call. The fields of the URL are parsed - from a string by the :func:`.make_url` function. the string + from a string by the :func:`.make_url` function. The string format of the URL is an RFC-1738-style string. All initialization parameters are available as public attributes. diff --git a/lib/sqlalchemy/event/base.py b/lib/sqlalchemy/event/base.py index 2eb8846f61..a87c1fe448 100644 --- a/lib/sqlalchemy/event/base.py +++ b/lib/sqlalchemy/event/base.py @@ -213,7 +213,7 @@ class Events(util.with_metaclass(_EventMeta, object)): # This allows an Events subclass to define additional utility # methods made available to the target via # "self.dispatch._events." - # @staticemethod to allow easy "super" calls while in a metaclass + # @staticmethod to allow easy "super" calls while in a metaclass # constructor. cls.dispatch = dispatch_cls(None) dispatch_cls._events = cls -- 2.47.3