Skip to content

Commit

Permalink
🎨 [pre-commit.ci] Auto format from pre-commit.com hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
pre-commit-ci[bot] committed Apr 8, 2024
1 parent bc43142 commit 6d05a4b
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions tests/test_relationship_inheritance.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,18 @@ class CreatedUpdatedMixin(SQLModel):
# the possibility of a conflict entirely.
#
created_by_id: Optional[int] = Field(default=None, foreign_key="user.id")
created_by: Optional[User] = Relationship(sa_relationship=declared_attr(lambda cls: relationship(User, foreign_keys=cls.created_by_id)))
created_by: Optional[User] = Relationship(
sa_relationship=declared_attr(
lambda cls: relationship(User, foreign_keys=cls.created_by_id)
)
)

updated_by_id: Optional[int] = Field(default=None, foreign_key="user.id")
updated_by: Optional[User] = Relationship(sa_relationship=declared_attr(lambda cls: relationship(User, foreign_keys=cls.updated_by_id)))
updated_by: Optional[User] = Relationship(
sa_relationship=declared_attr(
lambda cls: relationship(User, foreign_keys=cls.updated_by_id)
)
)

class Asset(CreatedUpdatedMixin, table=True):
id: Optional[int] = Field(default=None, primary_key=True)
Expand Down

0 comments on commit 6d05a4b

Please sign in to comment.