diff --git a/src/flask_sqlalchemy/extension.py b/src/flask_sqlalchemy/extension.py index 3429e059..4645f159 100644 --- a/src/flask_sqlalchemy/extension.py +++ b/src/flask_sqlalchemy/extension.py @@ -952,9 +952,7 @@ def _set_rel_query(self, kwargs: dict[str, t.Any]) -> None: backref[1].setdefault("query_class", self.Query) - def relationship( - self, *args: t.Any, **kwargs: t.Any - ) -> sa_orm.RelationshipProperty[t.Any]: + def relationship(self, *args: t.Any, **kwargs: t.Any) -> sa_orm.Relationship[t.Any]: """A :func:`sqlalchemy.orm.relationship` that applies this extension's :attr:`Query` class for dynamic relationships and backrefs. @@ -976,9 +974,7 @@ def dynamic_loader( self._set_rel_query(kwargs) return sa_orm.dynamic_loader(argument, **kwargs) - def _relation( - self, *args: t.Any, **kwargs: t.Any - ) -> sa_orm.RelationshipProperty[t.Any]: + def _relation(self, *args: t.Any, **kwargs: t.Any) -> sa_orm.Relationship[t.Any]: """A :func:`sqlalchemy.orm.relationship` that applies this extension's :attr:`Query` class for dynamic relationships and backrefs.