From 99c8c2ac2e010797d07c887b8a5ffbbe8afc3568 Mon Sep 17 00:00:00 2001 From: Alexander Hess Date: Tue, 1 Dec 2026 11:13:15 +0100 Subject: [PATCH] Type the relationships of `Courier` --- src/velofy/db/couriers.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/velofy/db/couriers.py b/src/velofy/db/couriers.py index 2c3aeb9..03b1623 100644 --- a/src/velofy/db/couriers.py +++ b/src/velofy/db/couriers.py @@ -6,6 +6,7 @@ import sqlalchemy as sa from sqlalchemy import orm from sqlalchemy.dialects import postgresql as psql +from velofy import db from velofy.db import meta @@ -68,7 +69,10 @@ class Courier(meta.Base): ) # Relationships - orders = orm.relationship("Order", back_populates="courier") + orders: orm.Mapped[list["db.Order"]] = orm.relationship( + "Order", + back_populates="courier", + ) def __repr__(self) -> str: """Non-literal text representation."""