From: Mike Bayer Date: Wed, 8 Feb 2023 23:49:43 +0000 (-0500) Subject: add test for #9268 X-Git-Tag: rel_2_0_3~3 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=318d36a1c25ee6007761fadf987f46d7c6ebb003;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git add test for #9268 Change-Id: I3075472de51b9d0d429f7f6204093f3e481fc121 --- diff --git a/test/ext/mypy/plain_files/hybrid_two.py b/test/ext/mypy/plain_files/hybrid_two.py index 430d796c60..619bbc839c 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, + )