From 5355171d538ad868cbbf1fa06bda21e7b969a8f2 Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Fri, 17 Feb 2023 11:23:41 -0500 Subject: [PATCH] typo, captions Change-Id: I547e66b60f5a7b2901a76ebc59469bce018e05ff --- lib/sqlalchemy/ext/hybrid.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 -- 2.47.3