From 9a2ec3d86b37d7f854ed19bd95ed33bfd8409fd1 Mon Sep 17 00:00:00 2001 From: Alexander Hess Date: Tue, 1 Dec 2026 10:05:14 +0100 Subject: [PATCH] Type the relationships of `Grid` --- src/velofy/db/grids.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/velofy/db/grids.py b/src/velofy/db/grids.py index 1c97748..e307e96 100644 --- a/src/velofy/db/grids.py +++ b/src/velofy/db/grids.py @@ -51,8 +51,14 @@ class Grid(meta.Base): ) # Relationships - city = orm.relationship("City", back_populates="grids") - pixels = orm.relationship("Pixel", back_populates="grid") + city: orm.Mapped[db.City] = orm.relationship( + "City", + back_populates="grids", + ) + pixels: orm.Mapped[list["db.Pixel"]] = orm.relationship( + "Pixel", + back_populates="grid", + ) def __repr__(self) -> str: """Non-literal text representation."""