From f588de3c00c0ea2878767e5aa7d796187eadebeb Mon Sep 17 00:00:00 2001 From: Bilal Tonga Date: Fri, 19 Jun 2026 13:34:50 +0200 Subject: [PATCH 1/2] Introduce pre-commit configuration --- .pre-commit-config.yaml | 10 ++++++++++ 1 file changed, 10 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..637450b --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,10 @@ +repos: + # Mirrors CI: poe lint → `ruff format --check` + `ruff check .` + - repo: https://github.com/astral-sh/ruff-pre-commit + rev: v0.15.13 + hooks: + - id: ruff + exclude: ^bin/ + - id: ruff-format + exclude: ^bin/ + From ce95d2fafc687411ee646b6b083d2ec832f75a43 Mon Sep 17 00:00:00 2001 From: Bilal Tonga Date: Fri, 19 Jun 2026 13:36:58 +0200 Subject: [PATCH 2/2] Add docs --- DEVELOP.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/DEVELOP.md b/DEVELOP.md index 482d785..8073ae2 100644 --- a/DEVELOP.md +++ b/DEVELOP.md @@ -32,6 +32,19 @@ Format code: poe format +## Pre-commit hooks + +The repository ships a `.pre-commit-config.yaml` that runs the same linters +as CI (`ruff check` + `ruff format --check`) on every commit. To install: + + pip install pre-commit + pre-commit install + +After that, linting runs automatically before each `git commit`. To run it +manually across all files: + + pre-commit run --all-files + ## Preparing a release