From: Mike Bayer Date: Fri, 17 Feb 2023 16:23:41 +0000 (-0500) Subject: typo, captions X-Git-Tag: rel_2_0_5~40 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5355171d538ad868cbbf1fa06bda21e7b969a8f2;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git typo, captions Change-Id: I547e66b60f5a7b2901a76ebc59469bce018e05ff --- diff --git a/lib/sqlalchemy/ext/hybrid.py b/lib/sqlalchemy/ext/hybrid.py index 1ff5a38d38..735e467160 100644 --- a/lib/sqlalchemy/ext/hybrid.py +++ b/lib/sqlalchemy/ext/hybrid.py @@ -212,6 +212,8 @@ attribute repeatedly, using the **same attribute name** each time, as in the example below that illustrates the use of :meth:`.hybrid_property.setter` and :meth:`.hybrid_property.expression` for the ``Interval.radius`` descriptor:: + # correct use, however is not accepted by pep-484 tooling + class Interval(Base): # ... @@ -252,6 +254,8 @@ the :attr:`.hybrid_property.inplace` decorator allows the same decorator to be re-used with different method names, while still producing a single decorator under one name:: + # correct use which is also accepted by pep-484 tooling + class Interval(Base): # ... @@ -266,7 +270,7 @@ a single decorator under one name:: @radius.inplace.expression @classmethod - def _radius_expression(cls) -> ColumnElement[float]:: + def _radius_expression(cls) -> ColumnElement[float]: return type_coerce(func.abs(cls.length) / 2, Float) Using :attr:`.hybrid_property.inplace` further qualifies the use of the