From 263d9822d1915823c5c3e036d40d78bd1bb80791 Mon Sep 17 00:00:00 2001 From: Julian Pawlowski Date: Mon, 3 Nov 2025 15:54:27 +0000 Subject: [PATCH] add pre-commit --- .pre-commit-config.yaml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 .pre-commit-config.yaml diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..9b0f5a3 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,23 @@ +# See https://pre-commit.com for more information +# See https://pre-commit.com/hooks.html for more hooks +# +# This configuration uses local hooks that rely on packages +# defined in requirements.txt, avoiding separate pre-commit environments. +repos: + - repo: local + hooks: + # Run the Ruff linter with auto-fix + - id: ruff + name: ruff + entry: ruff check --fix --exit-non-zero-on-fix + language: system + types: [python] + require_serial: true + + # Run the Ruff formatter + - id: ruff-format + name: ruff format + entry: ruff format + language: system + types: [python] + require_serial: true