From bd4869789e1c12d9f9eddc365aa8b415b5a39a0f Mon Sep 17 00:00:00 2001 From: adnanhd Date: Wed, 3 Jun 2026 03:32:44 +0300 Subject: [PATCH] chore: add pre-commit hooks mirroring the CI lint + type-check gates ruff (check + format) and a local mypy hook, matching build.yaml so the gates run before commit. Enable with: pre-commit install --- .pre-commit-config.yaml | 18 ++++++++++++++++++ 1 file changed, 18 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..b825859 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,18 @@ +# Mirrors the build.yaml lint + type-check gates so failures are caught before commit. +# Enable once per clone: pre-commit install +repos: + - repo: https://github.com/astral-sh/ruff-pre-commit + rev: v0.8.6 + hooks: + - id: ruff + - id: ruff-format + + # mypy needs the project's installed deps, so run it from the local env. + - repo: local + hooks: + - id: mypy + name: mypy + entry: mypy eventforge/ + language: system + types: [python] + pass_filenames: false