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 699e7f0443 - Show all commits

Type the relationships of Pixel

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

View file

@ -63,9 +63,18 @@ class Pixel(meta.Base):
)
# Relationships
grid = orm.relationship("Grid", back_populates="pixels")
addresses = orm.relationship("AddressPixelAssociation", back_populates="pixel")
forecasts = orm.relationship("Forecast", back_populates="pixel")
grid: orm.Mapped[db.Grid] = orm.relationship(
"Grid",
back_populates="pixels",
)
addresses: orm.Mapped[list[db.AddressPixelAssociation]] = orm.relationship(
"AddressPixelAssociation",
back_populates="pixel",
)
forecasts: orm.Mapped[list[db.Forecast]] = orm.relationship(
"Forecast",
back_populates="pixel",
)
def __repr__(self) -> str:
"""Non-literal text representation."""