From f70fe57eb954ae54fa0380f3ae19f0a9bec40cf6 Mon Sep 17 00:00:00 2001 From: charlotte-a27 <34127601+charlotte-a27@users.noreply.github.com> Date: Wed, 21 May 2025 14:52:27 +0100 Subject: [PATCH 1/5] Update .pre-commit-config.yaml --- .pre-commit-config.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 3ce7aab..9ccc254 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -26,3 +26,8 @@ repos: - flake8-comprehensions - flake8-tidy-imports - flake8-typing-imports +- repo: https://github.com/charliermarsh/ruff-pre-commit + rev: v0.11.10 + hooks: + - id: ruff + args: [--fix] From 16c7e471587d6d3f9186067740fb9fe5b0174f12 Mon Sep 17 00:00:00 2001 From: charlotte-a27 <34127601+charlotte-a27@users.noreply.github.com> Date: Wed, 21 May 2025 14:55:41 +0100 Subject: [PATCH 2/5] Update .pre-commit-config.yaml --- .pre-commit-config.yaml | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 9ccc254..6f6af03 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -13,19 +13,6 @@ repos: - id: detect-private-key - id: no-commit-to-branch - id: check-added-large-files -- repo: https://github.com/pycqa/isort - rev: 5.12.0 - hooks: - - id: isort -- repo: https://github.com/PyCQA/flake8 - rev: 6.1.0 - hooks: - - id: flake8 - additional_dependencies: - - flake8-bugbear - - flake8-comprehensions - - flake8-tidy-imports - - flake8-typing-imports - repo: https://github.com/charliermarsh/ruff-pre-commit rev: v0.11.10 hooks: From f675187da82989771281711af1ff189685e8b06a Mon Sep 17 00:00:00 2001 From: Charlotte Apperley <34127601+charlotte-a27@users.noreply.github.com> Date: Wed, 21 May 2025 15:20:36 +0100 Subject: [PATCH 3/5] add ruff to the pre-commit config --- .pre-commit-config.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 6f6af03..68a9012 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -13,8 +13,8 @@ repos: - id: detect-private-key - id: no-commit-to-branch - id: check-added-large-files -- repo: https://github.com/charliermarsh/ruff-pre-commit - rev: v0.11.10 +- repo: https://github.com/astral-sh/ruff-pre-commit + rev: v0.4.0 hooks: - id: ruff args: [--fix] From 434f34310c2463423d736a0012ca40c1da0ab3dd Mon Sep 17 00:00:00 2001 From: Charlotte Apperley <34127601+charlotte-a27@users.noreply.github.com> Date: Wed, 21 May 2025 15:45:23 +0100 Subject: [PATCH 4/5] Add SQLFLuff to pre-commit --- .pre-commit-config.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 68a9012..e53f446 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -18,3 +18,8 @@ repos: hooks: - id: ruff args: [--fix] +- repo: https://github.com/sqlfluff/sqlfluff + rev: 3.4.0 + hooks: + - id: sqlfluff-lint + - id: sqlfluff-fix From 10ff6743cb6b66763806c9cc7b81e4cfdd51a4f4 Mon Sep 17 00:00:00 2001 From: charlotte-a27 <34127601+charlotte-a27@users.noreply.github.com> Date: Wed, 21 May 2025 15:53:47 +0100 Subject: [PATCH 5/5] update based on ruff documentation --- .pre-commit-config.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index e53f446..d678c94 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -16,8 +16,9 @@ repos: - repo: https://github.com/astral-sh/ruff-pre-commit rev: v0.4.0 hooks: - - id: ruff + - id: ruff-check args: [--fix] + - id: ruff-format - repo: https://github.com/sqlfluff/sqlfluff rev: 3.4.0 hooks: