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 bda9cf69ed - Show all commits

Type the relationships of Customer

Alexander Hess 2026-12-01 11:13:27 +01:00
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.