chore(quality): apply ruff autofixes and formatting (29 fixes, 41 files reformatted)

This commit is contained in:
Agent Zero
2026-06-10 21:31:41 +00:00
parent 054d4041e6
commit 7c12a96cdc
43 changed files with 1096 additions and 524 deletions
+8 -8
View File
@@ -21,7 +21,9 @@ class Vehicle(Base):
String(36), ForeignKey("accounts.id", ondelete="CASCADE"), nullable=False
)
name: Mapped[str] = mapped_column(String(255), nullable=False)
license_plate: Mapped[str | None] = mapped_column(String(50), nullable=True, unique=True)
license_plate: Mapped[str | None] = mapped_column(
String(50), nullable=True, unique=True
)
brand: Mapped[str | None] = mapped_column(String(100), nullable=True)
model: Mapped[str | None] = mapped_column(String(100), nullable=True)
year: Mapped[int | None] = mapped_column(nullable=True)
@@ -64,15 +66,11 @@ class VehicleAssignment(Base):
vehicle_id: Mapped[str] = mapped_column(
String(36), ForeignKey("vehicles.id", ondelete="CASCADE"), nullable=False
)
project_id: Mapped[str | None] = mapped_column(
String(36), nullable=True
)
project_id: Mapped[str | None] = mapped_column(String(36), nullable=True)
start_date: Mapped[datetime] = mapped_column(
DateTime(timezone=True), nullable=False
)
end_date: Mapped[datetime] = mapped_column(
DateTime(timezone=True), nullable=False
)
end_date: Mapped[datetime] = mapped_column(DateTime(timezone=True), nullable=False)
status: Mapped[str] = mapped_column(
String(20), nullable=False, default="assigned"
) # assigned, in_use, returned
@@ -92,4 +90,6 @@ class VehicleAssignment(Base):
vehicle: Mapped["Vehicle"] = relationship("Vehicle", back_populates="assignments")
def __repr__(self) -> str:
return f"<VehicleAssignment {self.vehicle_id}: {self.start_date}-{self.end_date}>"
return (
f"<VehicleAssignment {self.vehicle_id}: {self.start_date}-{self.end_date}>"
)