summaryrefslogtreecommitdiff
path: root/test/ext/mypy
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2023-02-08 18:49:43 -0500
committerMike Bayer <mike_mp@zzzcomputing.com>2023-02-08 18:49:43 -0500
commit318d36a1c25ee6007761fadf987f46d7c6ebb003 (patch)
tree4193e0cce5b2178bdf602e63ea7ab9ddfee1bdbe /test/ext/mypy
parent1a115e5ac91d18ef48f2a314d49973332130725a (diff)
downloadsqlalchemy-318d36a1c25ee6007761fadf987f46d7c6ebb003.tar.gz
add test for #9268
Change-Id: I3075472de51b9d0d429f7f6204093f3e481fc121
Diffstat (limited to 'test/ext/mypy')
-rw-r--r--test/ext/mypy/plain_files/hybrid_two.py18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/ext/mypy/plain_files/hybrid_two.py b/test/ext/mypy/plain_files/hybrid_two.py
index 430d796c6..619bbc839 100644
--- a/test/ext/mypy/plain_files/hybrid_two.py
+++ b/test/ext/mypy/plain_files/hybrid_two.py
@@ -89,3 +89,21 @@ if typing.TYPE_CHECKING:
# EXPECTED_RE_TYPE: sqlalchemy.*.BinaryExpression\[builtins.bool\*?\]
reveal_type(expr3)
+
+# test #9268
+
+
+class Foo(Base):
+ val: bool
+
+ def needs_update_getter(self) -> bool:
+ return self.val
+ ...
+
+ def needs_update_setter(self, value: bool) -> None:
+ self.val = value
+
+ needs_update: hybrid_property[bool] = hybrid_property(
+ needs_update_getter,
+ needs_update_setter,
+ )