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 9a2ec3d86b - Show all commits

Type the relationships of Grid

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

View file

@ -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."""