Migrate pre-commit hooks from pre-commit to prek

Replace the Python-based pre-commit framework with prek (Rust) for
faster hook execution. Convert .pre-commit-config.yaml to prek.toml,
remove pre-commit from dev dependencies, and apply ruff auto-fixes
(UP037: remove unnecessary string quotes in type annotations).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-17 18:17:23 +01:00
parent bbc054c02f
commit 8cfa074ea6
18 changed files with 94 additions and 82 deletions

View File

@@ -23,17 +23,17 @@ class Route(Base):
)
pinwheel_zone: Mapped[int | None] = mapped_column(SmallInteger, default=None)
version_group: Mapped["VersionGroup"] = relationship(back_populates="routes")
route_encounters: Mapped[list["RouteEncounter"]] = relationship(
version_group: Mapped[VersionGroup] = relationship(back_populates="routes")
route_encounters: Mapped[list[RouteEncounter]] = relationship(
back_populates="route", cascade="all, delete-orphan"
)
encounters: Mapped[list["Encounter"]] = relationship(back_populates="route")
encounters: Mapped[list[Encounter]] = relationship(back_populates="route")
# Self-referential relationships for route grouping
parent: Mapped["Route | None"] = relationship(
parent: Mapped[Route | None] = relationship(
back_populates="children", remote_side=[id]
)
children: Mapped[list["Route"]] = relationship(
children: Mapped[list[Route]] = relationship(
back_populates="parent", cascade="all, delete-orphan"
)