From 5e8bfa3d1960e72707e59a050f625236ab5b0a0b Mon Sep 17 00:00:00 2001 From: armanddidierjean <95971503+armanddidierjean@users.noreply.github.com> Date: Thu, 4 Apr 2024 17:58:24 +0200 Subject: [PATCH] Apply ruff formating when generating migrations --- alembic.ini | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/alembic.ini b/alembic.ini index 20f9c6bae..33c934b07 100644 --- a/alembic.ini +++ b/alembic.ini @@ -66,6 +66,17 @@ version_path_separator = os # Use os.pathsep. Default configuration used for ne # black.entrypoint = black # black.options = -l 79 REVISION_SCRIPT_FILENAME +# Lint and format using Ruff +hooks=ruff_check, ruff_format + +ruff_check.type = exec +ruff_check.executable = ruff +ruff_check.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