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

Type the relationships of AddressPixelAssociation

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

View file

@ -3,6 +3,7 @@
import sqlalchemy as sa
from sqlalchemy import orm
from velofy import db
from velofy.db import meta
@ -64,5 +65,11 @@ class AddressPixelAssociation(meta.Base):
)
# Relationships
address = orm.relationship("Address", back_populates="pixels")
pixel = orm.relationship("Pixel", back_populates="addresses")
address: orm.Mapped[db.Address] = orm.relationship(
"Address",
back_populates="pixels",
)
pixel: orm.Mapped["db.Pixel"] = orm.relationship(
"Pixel",
back_populates="addresses",
)