diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2023-04-18 09:42:50 -0400 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2023-04-18 11:20:47 -0400 |
commit | 756501b65a9c88790c1947d7c39956bfc374b8e8 (patch) | |
tree | 82c47a83a32c995c95645ec0ebe7962d24b3ff8d /lib/sqlalchemy/orm/attributes.py | |
parent | 0112b3e2dc15f115f4b560bfc761e00fe1d4de24 (diff) | |
download | sqlalchemy-756501b65a9c88790c1947d7c39956bfc374b8e8.tar.gz |
improve return type for QueryableAttribute.and_()
Fixed typing issue where :meth:`_orm.PropComparator.and_` expressions would
not be correctly typed inside of loader options such as
:func:`_orm.selectinload`.
Fixes: #9669
Change-Id: I874cb22c004e0a24f2b7f530fda542de2c4c6d3b
Diffstat (limited to 'lib/sqlalchemy/orm/attributes.py')
-rw-r--r-- | lib/sqlalchemy/orm/attributes.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/sqlalchemy/orm/attributes.py b/lib/sqlalchemy/orm/attributes.py index 3a60eda4f..69ddd3388 100644 --- a/lib/sqlalchemy/orm/attributes.py +++ b/lib/sqlalchemy/orm/attributes.py @@ -405,7 +405,7 @@ class QueryableAttribute( def and_( self, *clauses: _ColumnExpressionArgument[bool] - ) -> interfaces.PropComparator[bool]: + ) -> QueryableAttribute[bool]: if TYPE_CHECKING: assert isinstance(self.comparator, RelationshipProperty.Comparator) |