Skip to content

Commit

Permalink
Add ruff formatter to alembic
Browse files Browse the repository at this point in the history
  • Loading branch information
berrydenhartog committed May 10, 2024
1 parent f9204fd commit 6f8addf
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 5 additions & 1 deletion alembic.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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
"""

Expand All @@ -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
Expand Down

0 comments on commit 6f8addf

Please sign in to comment.