]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
Fix typing of hybrid `__set__()` method
authorMicah Denbraver <micah.denbraver@whatnot.com>
Mon, 18 Aug 2025 17:35:56 +0000 (10:35 -0700)
committerMicah Denbraver <micah.denbraver@whatnot.com>
Mon, 18 Aug 2025 17:35:56 +0000 (10:35 -0700)
lib/sqlalchemy/ext/hybrid.py

index fe1f33685259e6687c008c42f7f960280ed389ca..3b9ede401471af9381dd7e5124ef20f2ebea888a 100644 (file)
@@ -1454,7 +1454,7 @@ class hybrid_property(interfaces.InspectionAttrInfo, ORMDescriptor[_T]):
         else:
             return self.fget(instance)
 
-    def __set__(self, instance: object, value: Any) -> None:
+    def __set__(self, instance: object, value: _T) -> None:
         if self.fset is None:
             raise AttributeError("can't set attribute")
         self.fset(instance, value)