Type the relationships of Customer

This commit is contained in:
Alexander Hess 2026-12-01 11:13:27 +01:00
commit bda9cf69ed
Signed by: alexander
GPG key ID: B46EDB4DFC26805D

View file

@ -26,7 +26,10 @@ class Customer(meta.Base):
return f"<{self.__class__.__name__}(#{self.id})>"
# Relationships
orders = orm.relationship("Order", back_populates="customer")
orders: orm.Mapped[list["db.Order"]] = orm.relationship(
"Order",
back_populates="customer",
)
def clear_map(self) -> "Customer": # pragma: no cover
"""Shortcut to the `...city.clear_map()` method.