From 98fb40a68bda108525dc0e83812267e50fcc321e Mon Sep 17 00:00:00 2001 From: Alexander Capehart Date: Sat, 23 Mar 2024 22:09:00 -0600 Subject: [PATCH] backend: fix black --- .../versions/3282eafd6bb4_create_van_location_table.py | 5 ++++- .../43451376c0bf_create_van_tracker_session_table.py | 5 ++++- backend/src/model/van_tracker_session.py | 7 +++++-- 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/backend/alembic/versions/3282eafd6bb4_create_van_location_table.py b/backend/alembic/versions/3282eafd6bb4_create_van_location_table.py index e96ea329..4e18a7f4 100644 --- a/backend/alembic/versions/3282eafd6bb4_create_van_location_table.py +++ b/backend/alembic/versions/3282eafd6bb4_create_van_location_table.py @@ -23,7 +23,10 @@ def upgrade() -> None: "van_location", sa.Column("id", sa.Integer, primary_key=True), sa.Column( - "created_at", sa.DateTime, nullable=False, server_default=sa.func.now() # pylint: disable=all + "created_at", + sa.DateTime, + nullable=False, + server_default=sa.func.now(), # pylint: disable=all ), sa.Column("session_id", sa.Integer, nullable=False), sa.Column("lat", sa.Float, nullable=False), diff --git a/backend/alembic/versions/43451376c0bf_create_van_tracker_session_table.py b/backend/alembic/versions/43451376c0bf_create_van_tracker_session_table.py index deb4d2e4..efc0420b 100644 --- a/backend/alembic/versions/43451376c0bf_create_van_tracker_session_table.py +++ b/backend/alembic/versions/43451376c0bf_create_van_tracker_session_table.py @@ -23,7 +23,10 @@ def upgrade() -> None: "van_tracker_session", sa.Column("id", sa.Integer, primary_key=True), sa.Column( - "created_at", sa.DateTime, nullable=False, server_default=sa.func.now() # pylint: disable=all + "created_at", + sa.DateTime, + nullable=False, + server_default=sa.func.now(), # pylint: disable=all ), sa.Column( "updated_at", diff --git a/backend/src/model/van_tracker_session.py b/backend/src/model/van_tracker_session.py index 7171c172..5289b077 100644 --- a/backend/src/model/van_tracker_session.py +++ b/backend/src/model/van_tracker_session.py @@ -14,10 +14,13 @@ class VanTrackerSession(Base): primary_key=True, autoincrement=True, nullable=False ) created_at: Mapped[datetime] = mapped_column( - TZDateTime, nullable=False, server_default=func.now() # pylint: disable=all + TZDateTime, nullable=False, server_default=func.now() # pylint: disable=all ) updated_at: Mapped[datetime] = mapped_column( - TZDateTime, nullable=False, server_default=func.now(), onupdate=func.now() # pylint: disable=all + TZDateTime, + nullable=False, + server_default=func.now(), + onupdate=func.now(), # pylint: disable=all ) van_guid: Mapped[str] = mapped_column(nullable=False) route_id: Mapped[int] = mapped_column(nullable=False)