From 6f8addf91ea4615f34f259a07410081006c8c5d3 Mon Sep 17 00:00:00 2001 From: Berry den Hartog <38954346+berrydenhartog@users.noreply.github.com> Date: Fri, 10 May 2024 14:01:01 +0000 Subject: [PATCH] Add ruff formatter to alembic --- alembic.ini | 6 +++++- ..._test_table.py => a1d47bd833f8_added_hero_test_table.py} | 6 +++--- 2 files changed, 8 insertions(+), 4 deletions(-) rename tad/migrations/versions/{17f5b05e9ec3_added_hero_test_table.py => a1d47bd833f8_added_hero_test_table.py} (89%) diff --git a/alembic.ini b/alembic.ini index bfc48614..2e8e170c 100644 --- a/alembic.ini +++ b/alembic.ini @@ -75,11 +75,15 @@ script_location = tad/migrations # black.options = -l 79 REVISION_SCRIPT_FILENAME # lint with attempts to fix using "ruff" - use the exec runner, execute a binary -hooks = ruff +hooks = ruff, ruff_format ruff.type = exec ruff.executable = ruff ruff.options = check --fix REVISION_SCRIPT_FILENAME +ruff_format.type = exec +ruff_format.executable = ruff +ruff_format.options = format REVISION_SCRIPT_FILENAME + # Logging configuration [loggers] keys = root,sqlalchemy,alembic diff --git a/tad/migrations/versions/17f5b05e9ec3_added_hero_test_table.py b/tad/migrations/versions/a1d47bd833f8_added_hero_test_table.py similarity index 89% rename from tad/migrations/versions/17f5b05e9ec3_added_hero_test_table.py rename to tad/migrations/versions/a1d47bd833f8_added_hero_test_table.py index b3f13cba..d945dc80 100644 --- a/tad/migrations/versions/17f5b05e9ec3_added_hero_test_table.py +++ b/tad/migrations/versions/a1d47bd833f8_added_hero_test_table.py @@ -1,8 +1,8 @@ """Added hero test table -Revision ID: 17f5b05e9ec3 +Revision ID: a1d47bd833f8 Revises: -Create Date: 2024-05-10 13:57:16.989570 +Create Date: 2024-05-10 14:00:32.948932 """ @@ -13,7 +13,7 @@ from alembic import op # revision identifiers, used by Alembic. -revision: str = "17f5b05e9ec3" +revision: str = "a1d47bd833f8" down_revision: str | None = None branch_labels: str | Sequence[str] | None = None depends_on: str | Sequence[str] | None = None