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/ext | |
| 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/ext')
| -rw-r--r-- | lib/sqlalchemy/ext/associationproxy.py | 4 | ||||
| -rw-r--r-- | lib/sqlalchemy/ext/declarative/api.py | 3 | ||||
| -rw-r--r-- | lib/sqlalchemy/ext/declarative/clsregistry.py | 2 | ||||
| -rw-r--r-- | lib/sqlalchemy/ext/horizontal_shard.py | 6 | ||||
| -rw-r--r-- | lib/sqlalchemy/ext/hybrid.py | 19 | ||||
| -rw-r--r-- | lib/sqlalchemy/ext/instrumentation.py | 4 |
6 files changed, 19 insertions, 19 deletions
diff --git a/lib/sqlalchemy/ext/associationproxy.py b/lib/sqlalchemy/ext/associationproxy.py index fc10cb88d..dd6217664 100644 --- a/lib/sqlalchemy/ext/associationproxy.py +++ b/lib/sqlalchemy/ext/associationproxy.py @@ -844,8 +844,8 @@ class ObjectAssociationProxyInstance(AssociationProxyInstance): """Produce a proxied 'contains' expression using EXISTS. This expression will be a composed product - using the :meth:`.RelationshipProperty.Comparator.any` - , :meth:`.RelationshipProperty.Comparator.has`, + using the :meth:`.RelationshipProperty.Comparator.any`, + :meth:`.RelationshipProperty.Comparator.has`, and/or :meth:`.RelationshipProperty.Comparator.contains` operators of the underlying proxied attributes. """ diff --git a/lib/sqlalchemy/ext/declarative/api.py b/lib/sqlalchemy/ext/declarative/api.py index 65d100bc7..31b5e492c 100644 --- a/lib/sqlalchemy/ext/declarative/api.py +++ b/lib/sqlalchemy/ext/declarative/api.py @@ -230,7 +230,8 @@ class declared_attr(interfaces._MappedAttribute, property): def id(cls): if has_inherited_table(cls): return Column( - ForeignKey('myclass.id'), primary_key=True) + ForeignKey('myclass.id'), primary_key=True + ) else: return Column(Integer, primary_key=True) diff --git a/lib/sqlalchemy/ext/declarative/clsregistry.py b/lib/sqlalchemy/ext/declarative/clsregistry.py index 20de3c636..51af6f1b4 100644 --- a/lib/sqlalchemy/ext/declarative/clsregistry.py +++ b/lib/sqlalchemy/ext/declarative/clsregistry.py @@ -132,7 +132,7 @@ class _MultipleClassMarker(object): class _ModuleMarker(object): - """"refers to a module name within + """Refers to a module name within _decl_class_registry. """ diff --git a/lib/sqlalchemy/ext/horizontal_shard.py b/lib/sqlalchemy/ext/horizontal_shard.py index 9d7266d1a..786d00597 100644 --- a/lib/sqlalchemy/ext/horizontal_shard.py +++ b/lib/sqlalchemy/ext/horizontal_shard.py @@ -34,9 +34,9 @@ class ShardedQuery(Query): self._shard_id = None def set_shard(self, shard_id): - """return a new query, limited to a single shard ID. + """Return a new query, limited to a single shard ID. - all subsequent operations with the returned query will + All subsequent operations with the returned query will be against the single shard regardless of other state. The shard_id can be passed for a 2.0 style execution to the @@ -79,7 +79,7 @@ class ShardedSession(Session): where the query should be issued. Results from all shards returned will be combined together into a single listing. - .. versionchanged:: 1.4 The ``execute_chooser`` paramter + .. versionchanged:: 1.4 The ``execute_chooser`` parameter supersedes the ``query_chooser`` parameter. :param shards: A dictionary of string shard names diff --git a/lib/sqlalchemy/ext/hybrid.py b/lib/sqlalchemy/ext/hybrid.py index efd8d7d6b..b031e82fd 100644 --- a/lib/sqlalchemy/ext/hybrid.py +++ b/lib/sqlalchemy/ext/hybrid.py @@ -668,12 +668,11 @@ simple:: return self.parent.parent For the expression, things are not so clear. We'd need to construct a -:class:`_query.Query` where we :meth:`_query.Query.join` twice along ``Node. -parent`` to -get to the ``grandparent``. We can instead return a transforming callable -that we'll combine with the :class:`.Comparator` class to receive any -:class:`_query.Query` object, and return a new one that's joined to the -``Node.parent`` attribute and filtered based on the given criterion:: +:class:`_query.Query` where we :meth:`_query.Query.join` twice along +``Node.parent`` to get to the ``grandparent``. We can instead return a +transforming callable that we'll combine with the :class:`.Comparator` class to +receive any :class:`_query.Query` object, and return a new one that's joined to +the ``Node.parent`` attribute and filtered based on the given criterion:: from sqlalchemy.ext.hybrid import Comparator @@ -690,7 +689,7 @@ that we'll combine with the :class:`.Comparator` class to receive any class Node(Base): __tablename__ = 'node' - id =Column(Integer, primary_key=True) + id = Column(Integer, primary_key=True) parent_id = Column(Integer, ForeignKey('node.id')) parent = relationship("Node", remote_side=id) @@ -711,7 +710,7 @@ the comparison ``Node(id=5)``. A function ``transform`` is then returned which will transform a :class:`_query.Query` first to join to ``Node.parent``, then to compare ``parent_alias`` using :attr:`.Operators.eq` against the left and right -sides, passing into :class:`_query.Query.filter`: +sides, passing into :meth:`_query.Query.filter`: .. sourcecode:: pycon+sql @@ -987,7 +986,7 @@ class hybrid_property(interfaces.InspectionAttrInfo): .. note:: - when referring to a hybrid property from an owning class (e.g. + When referring to a hybrid property from an owning class (e.g. ``SomeClass.some_hybrid``), an instance of :class:`.QueryableAttribute` is returned, representing the expression or comparator object as well as this hybrid object. @@ -1027,7 +1026,7 @@ class hybrid_property(interfaces.InspectionAttrInfo): .. note:: - when referring to a hybrid property from an owning class (e.g. + When referring to a hybrid property from an owning class (e.g. ``SomeClass.some_hybrid``), an instance of :class:`.QueryableAttribute` is returned, representing the expression or comparator object as this hybrid object. However, diff --git a/lib/sqlalchemy/ext/instrumentation.py b/lib/sqlalchemy/ext/instrumentation.py index 378d7445f..300d0d81c 100644 --- a/lib/sqlalchemy/ext/instrumentation.py +++ b/lib/sqlalchemy/ext/instrumentation.py @@ -42,10 +42,10 @@ inheritance hierarchy. The value of this attribute must be a callable and will be passed a class object. The callable must return one of: - - An instance of an InstrumentationManager or subclass + - An instance of an :class:`.InstrumentationManager` or subclass - An object implementing all or some of InstrumentationManager (TODO) - A dictionary of callables, implementing all or some of the above (TODO) - - An instance of a ClassManager or subclass + - An instance of a :class:`.ClassManager` or subclass This attribute is consulted by SQLAlchemy instrumentation resolution, once the :mod:`sqlalchemy.ext.instrumentation` module |
