From: Sebastián Ramírez Date: Fri, 26 Dec 2025 11:42:29 +0000 (-0800) Subject: 🔧 Update pre-commit, generate select on pre-commit, use local Ruff (#1697) X-Git-Tag: 0.0.30~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1d215b709869dc774bf43d034925ae700ca506a6;p=thirdparty%2Ffastapi%2Fsqlmodel.git 🔧 Update pre-commit, generate select on pre-commit, use local Ruff (#1697) --- diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 20a49e7a..41c64c03 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,20 +1,35 @@ # See https://pre-commit.com for more information # See https://pre-commit.com/hooks.html for more hooks repos: -- repo: https://github.com/pre-commit/pre-commit-hooks + - repo: https://github.com/pre-commit/pre-commit-hooks rev: v6.0.0 hooks: - - id: check-added-large-files - - id: check-toml - - id: check-yaml + - id: check-added-large-files + - id: check-toml + - id: check-yaml args: - - --unsafe - - id: end-of-file-fixer - - id: trailing-whitespace -- repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.14.10 + - --unsafe + - id: end-of-file-fixer + - id: trailing-whitespace + + - repo: local hooks: - - id: ruff - args: - - --fix - - id: ruff-format + - id: local-ruff-check + name: ruff check + entry: uv run ruff check --force-exclude --fix --exit-non-zero-on-fix + require_serial: true + language: unsupported + types: [python] + + - id: local-ruff-format + name: ruff format + entry: uv run ruff format --force-exclude --exit-non-zero-on-format + require_serial: true + language: unsupported + types: [python] + + - id: generate-select + language: unsupported + name: generate-select + entry: uv run ./scripts/generate_select.py + files: ^scripts/generate_select\.py|sqlmodel/sql/_expression_select_gen\.py\.jinja2$