Skip to content

Commit

Permalink
Fix issue pallets-eco#1318
Browse files Browse the repository at this point in the history
Fix the typehint inconsistence of `db.relationship(...)`.
  • Loading branch information
cainmagi committed Mar 26, 2024
1 parent 42a36a3 commit 4e52686
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/flask_sqlalchemy/extension.py
Original file line number Diff line number Diff line change
Expand Up @@ -952,7 +952,7 @@ def _set_rel_query(self, kwargs: dict[str, t.Any]) -> None:

def relationship(
self, *args: t.Any, **kwargs: t.Any
) -> sa_orm.RelationshipProperty[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.
Expand All @@ -976,7 +976,7 @@ def dynamic_loader(

def _relation(
self, *args: t.Any, **kwargs: t.Any
) -> sa_orm.RelationshipProperty[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.
Expand Down

0 comments on commit 4e52686

Please sign in to comment.