diff options
| author | aplatkouski <5857672+aplatkouski@users.noreply.github.com> | 2020-06-22 11:34:39 -0400 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2020-06-25 19:42:28 -0400 |
| commit | 2a1a9f5f5a9723f757439657d2bdf224baed8748 (patch) | |
| tree | 0fb5b7e4dfbe21b329da52e0774ad557ecac1714 /lib/sqlalchemy/engine | |
| parent | 3138201a82d4e62e56e44ca9c8914c20dd46d1b4 (diff) | |
| download | sqlalchemy-2a1a9f5f5a9723f757439657d2bdf224baed8748.tar.gz | |
Fix a wide variety of typos and broken links
Note the PR has a few remaining doc linking issues
listed in the comment that must be addressed separately.
Signed-off-by: aplatkouski <5857672+aplatkouski@users.noreply.github.com>
Closes: #5371
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/5371
Pull-request-sha: 7e7d233cf3a0c66980c27db0fcdb3c7d93bc2510
Change-Id: I9c36e8d8804483950db4b42c38ee456e384c59e3
Diffstat (limited to 'lib/sqlalchemy/engine')
| -rw-r--r-- | lib/sqlalchemy/engine/base.py | 12 | ||||
| -rw-r--r-- | lib/sqlalchemy/engine/create.py | 4 | ||||
| -rw-r--r-- | lib/sqlalchemy/engine/cursor.py | 8 | ||||
| -rw-r--r-- | lib/sqlalchemy/engine/default.py | 4 | ||||
| -rw-r--r-- | lib/sqlalchemy/engine/events.py | 4 | ||||
| -rw-r--r-- | lib/sqlalchemy/engine/interfaces.py | 14 | ||||
| -rw-r--r-- | lib/sqlalchemy/engine/mock.py | 4 | ||||
| -rw-r--r-- | lib/sqlalchemy/engine/reflection.py | 48 | ||||
| -rw-r--r-- | lib/sqlalchemy/engine/result.py | 4 | ||||
| -rw-r--r-- | lib/sqlalchemy/engine/url.py | 2 |
10 files changed, 52 insertions, 52 deletions
diff --git a/lib/sqlalchemy/engine/base.py b/lib/sqlalchemy/engine/base.py index 81c0c9f58..19bf099a0 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. """ @@ -1944,7 +1944,7 @@ class Transaction(object): "deactive", however leave this transaction object in place as far as the connection's state. - for a "real" transaction this should roll back the transction + for a "real" transaction this should roll back the transaction and ensure this transaction is no longer a reset agent. this is used for nesting of marker transactions where the marker @@ -2372,7 +2372,7 @@ class Engine(Connectable, log.Identified): """Clear the compiled cache associated with the dialect. This applies **only** to the built-in cache that is established - via the :paramref:`.create_engine.query_cache_size` parameter. + via the :paramref:`_engine.create_engine.query_cache_size` parameter. It will not impact any dictionary caches that were passed via the :paramref:`.Connection.execution_options.query_cache` parameter. @@ -2510,8 +2510,8 @@ class Engine(Connectable, log.Identified): return "Engine(%r)" % self.url def dispose(self): - """Dispose of the connection pool used by this :class:`_engine.Engine` - . + """Dispose of the connection pool used by this + :class:`_engine.Engine`. This has the effect of fully closing all **currently checked in** database connections. Connections that are still checked out diff --git a/lib/sqlalchemy/engine/create.py b/lib/sqlalchemy/engine/create.py index 9bf72eb06..cc138412b 100644 --- a/lib/sqlalchemy/engine/create.py +++ b/lib/sqlalchemy/engine/create.py @@ -123,13 +123,13 @@ def create_engine(url, **kwargs): parameters specified in the URL argument to be bypassed. This hook is not as flexible as the newer - :class:`_events.DialectEvents.do_connect` hook which allows complete + :meth:`_events.DialectEvents.do_connect` hook which allows complete control over how a connection is made to the database, given the full set of URL arguments and state beforehand. .. seealso:: - :class:`_events.DialectEvents.do_connect` - event hook that allows + :meth:`_events.DialectEvents.do_connect` - event hook that allows full control over DBAPI connection mechanics. :ref:`custom_dbapi_args` diff --git a/lib/sqlalchemy/engine/cursor.py b/lib/sqlalchemy/engine/cursor.py index abffe0d1f..19267b0b8 100644 --- a/lib/sqlalchemy/engine/cursor.py +++ b/lib/sqlalchemy/engine/cursor.py @@ -720,7 +720,7 @@ class LegacyCursorResultMetaData(CursorResultMetaData): if result is not None: if result[MD_OBJECTS] is _UNPICKLED: util.warn_deprecated( - "Retreiving row values using Column objects from a " + "Retrieving row values using Column objects from a " "row that was unpickled is deprecated; adequate " "state cannot be pickled for this to be efficient. " "This usage will raise KeyError in a future release.", @@ -728,7 +728,7 @@ class LegacyCursorResultMetaData(CursorResultMetaData): ) else: util.warn_deprecated( - "Retreiving row values using Column objects with only " + "Retrieving row values using Column objects with only " "matching names as keys is deprecated, and will raise " "KeyError in a future release; only Column " "objects that are explicitly part of the statement " @@ -802,7 +802,7 @@ class ResultFetchStrategy(object): class NoCursorFetchStrategy(ResultFetchStrategy): """Cursor strategy for a result that has no open cursor. - There are two varities of this strategy, one for DQL and one for + There are two varieties of this strategy, one for DQL and one for DML (and also DDL), each of which represent a result that had a cursor but no longer has one. @@ -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/default.py b/lib/sqlalchemy/engine/default.py index cef719498..08d43c9f6 100644 --- a/lib/sqlalchemy/engine/default.py +++ b/lib/sqlalchemy/engine/default.py @@ -293,8 +293,8 @@ class DefaultDialect(interfaces.Dialect): """True if this dialect supports sane rowcount even if RETURNING is in use. - For dialects that don't support RETURNING, this is synomous - with supports_sane_rowcount. + For dialects that don't support RETURNING, this is synonymous with + ``supports_sane_rowcount``. """ return self.supports_sane_rowcount diff --git a/lib/sqlalchemy/engine/events.py b/lib/sqlalchemy/engine/events.py index ef760bb54..bd664fb8f 100644 --- a/lib/sqlalchemy/engine/events.py +++ b/lib/sqlalchemy/engine/events.py @@ -235,8 +235,8 @@ class ConnectionEvents(event.Events): .. versionadded: 1.4 - :param result: :class:`_engine.CursorResult` generated by the execution - . + :param result: :class:`_engine.CursorResult` generated by the + execution. """ diff --git a/lib/sqlalchemy/engine/interfaces.py b/lib/sqlalchemy/engine/interfaces.py index 59b9cd4ce..f925df6c5 100644 --- a/lib/sqlalchemy/engine/interfaces.py +++ b/lib/sqlalchemy/engine/interfaces.py @@ -386,13 +386,13 @@ class Dialect(object): Given a string `table_name` and an optional string `schema`, return check constraint information as a list of dicts with these keys: - name + * ``name`` - the check constraint's name - sqltext + * ``sqltext`` - the check constraint's SQL expression - \**kw + * ``**kw`` - other options passed to the dialect's get_check_constraints() method. @@ -424,7 +424,7 @@ class Dialect(object): """convert the given name to lowercase if it is detected as case insensitive. - this method is only used if the dialect defines + This method is only used if the dialect defines requires_name_normalize=True. """ @@ -434,7 +434,7 @@ class Dialect(object): """convert the given name to a case insensitive identifier for the backend if it is an all-lowercase name. - this method is only used if the dialect defines + This method is only used if the dialect defines requires_name_normalize=True. """ @@ -455,7 +455,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 @@ -1022,7 +1022,7 @@ class CreateEnginePlugin(object): what it needs here as well as remove its custom arguments from the :attr:`.URL.query` collection. The URL can be modified in-place in any other way as well. - :param kwargs: The keyword arguments passed to :func`.create_engine`. + :param kwargs: The keyword arguments passed to :func:`.create_engine`. The plugin can read and modify this dictionary in-place, to affect the ultimate arguments used to create the engine. It should remove its custom arguments from the dictionary as well. diff --git a/lib/sqlalchemy/engine/mock.py b/lib/sqlalchemy/engine/mock.py index d6a542e19..6c91d1434 100644 --- a/lib/sqlalchemy/engine/mock.py +++ b/lib/sqlalchemy/engine/mock.py @@ -92,8 +92,8 @@ def create_mock_engine(url, executor, **kw): string using :meth:`.DDLElement.compile`. .. versionadded:: 1.4 - the :func:`.create_mock_engine` function replaces - the previous "mock" engine strategy used with :func:`_sa.create_engine` - . + the previous "mock" engine strategy used with + :func:`_sa.create_engine`. .. seealso:: diff --git a/lib/sqlalchemy/engine/reflection.py b/lib/sqlalchemy/engine/reflection.py index fded37b2a..198b5e568 100644 --- a/lib/sqlalchemy/engine/reflection.py +++ b/lib/sqlalchemy/engine/reflection.py @@ -316,7 +316,7 @@ class Inspector(object): :meth:`_reflection.Inspector.get_table_names` :func:`.sort_tables_and_constraints` - similar method which works - with an already-given :class:`_schema.MetaData`. + with an already-given :class:`_schema.MetaData`. """ @@ -351,7 +351,7 @@ class Inspector(object): ] + [(None, list(remaining_fkcs))] def get_temp_table_names(self): - """return a list of temporary table names for the current bind. + """Return a list of temporary table names for the current bind. This method is unsupported by most dialects; currently only SQLite implements it. @@ -366,7 +366,7 @@ class Inspector(object): ) def get_temp_view_names(self): - """return a list of temporary view names for the current bind. + """Return a list of temporary view names for the current bind. This method is unsupported by most dialects; currently only SQLite implements it. @@ -458,7 +458,7 @@ class Inspector(object): * ``autoincrement`` - indicates that the column is auto incremented - this is returned as a boolean or 'auto' - * ``comment`` - (optional) the commnet on the column. Only some + * ``comment`` - (optional) the comment on the column. Only some dialects return this key * ``computed`` - (optional) when present it indicates that this column @@ -505,10 +505,10 @@ class Inspector(object): Given a string `table_name`, and an optional string `schema`, return primary key information as a dictionary with these keys: - constrained_columns + * ``constrained_columns`` - a list of column names that make up the primary key - name + * ``name`` - optional name of the primary key constraint. :param table_name: string name of the table. For special quoting, @@ -530,20 +530,20 @@ class Inspector(object): Given a string `table_name`, and an optional string `schema`, return foreign key information as a list of dicts with these keys: - constrained_columns + * ``constrained_columns`` - a list of column names that make up the foreign key - referred_schema + * ``referred_schema`` - the name of the referred schema - referred_table + * ``referred_table`` - the name of the referred table - referred_columns + * ``referred_columns`` - a list of column names in the referred table that correspond to constrained_columns - name + * ``name`` - optional name of the foreign key constraint. :param table_name: string name of the table. For special quoting, @@ -566,22 +566,22 @@ class Inspector(object): Given a string `table_name` and an optional string `schema`, return index information as a list of dicts with these keys: - name + * ``name`` - the index's name - column_names + * ``column_names`` - list of column names in order - unique + * ``unique`` - boolean - column_sorting + * ``column_sorting`` - optional dict mapping column names to tuple of sort keywords, which may include ``asc``, ``desc``, ``nullsfirst``, ``nullslast``. .. versionadded:: 1.3.5 - dialect_options + * ``dialect_options`` - dict of dialect-specific index options. May not be present for all dialects. @@ -607,10 +607,10 @@ class Inspector(object): Given a string `table_name` and an optional string `schema`, return unique constraint information as a list of dicts with these keys: - name + * ``name`` - the unique constraint's name - column_names + * ``column_names`` - list of column names in order :param table_name: string name of the table. For special quoting, @@ -633,7 +633,7 @@ class Inspector(object): Given a string ``table_name`` and an optional string ``schema``, return table comment information as a dictionary with these keys: - text + * ``text`` - text of the comment. Raises ``NotImplementedError`` for a dialect that does not support @@ -654,13 +654,13 @@ class Inspector(object): Given a string `table_name` and an optional string `schema`, return check constraint information as a list of dicts with these keys: - name + * ``name`` - the check constraint's name - sqltext + * ``sqltext`` - the check constraint's SQL expression - dialect_options + * ``dialect_options`` - may or may not be present; a dictionary with additional dialect-specific options for this CHECK constraint @@ -701,8 +701,8 @@ class Inspector(object): resolve_fks=True, _extend_on=None, ): - """Given a Table object, load its internal constructs based on - introspection. + """Given a :class:`_schema.Table` object, load its internal + constructs based on introspection. This is the underlying method used by most dialects to produce table reflection. Direct usage is like:: diff --git a/lib/sqlalchemy/engine/result.py b/lib/sqlalchemy/engine/result.py index ead52a3f8..f75cba57d 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 7b7a0047c..f0685d9e3 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. |
