Make mypy as strict as practical #13

Merged
alexander merged 32 commits from stricter-mypy into develop 2026-12-01 14:26:52 +01:00
Showing only changes of commit 76982126f4 - Show all commits

Type the relationships of Restaurant

Alexander Hess 2026-12-01 11:14:17 +01:00
Signed by: alexander
GPG key ID: B46EDB4DFC26805D

View file

@ -62,8 +62,11 @@ class Restaurant(meta.Base):
)
# Relationships
address = orm.relationship("Address", back_populates="restaurants")
orders = orm.relationship(
address: orm.Mapped[db.Address] = orm.relationship(
"Address",
back_populates="restaurants",
)
orders: orm.Mapped[list[db.Order]] = orm.relationship(
"Order",
back_populates="restaurant",
overlaps="orders_picked_up,pickup_address",