From 8f0209ba20bfb84958f9039957a61a87500fdbb3 Mon Sep 17 00:00:00 2001 From: Giovanni Condello Date: Sat, 9 May 2026 16:30:01 +0200 Subject: [PATCH] chore: add pre-commit config --- .pre-commit-config.yaml | 43 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 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..6ae070e --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,43 @@ +ci: + autofix_prs: false + skip: + # These steps run in the CI workflow already. Keep in sync. + - mypy + +default_language_version: + python: python3.13 + +repos: + - repo: https://github.com/python-poetry/poetry + rev: '2.1.3' + hooks: + - id: poetry-check + - id: poetry-lock + - repo: https://github.com/astral-sh/ruff-pre-commit + rev: v0.12.0 + hooks: + - id: ruff + args: + - --fix + - --unsafe-fixes + - id: ruff-format + - repo: local + hooks: + - id: mypy + name: Check with mypy + entry: poetry run mypy + language: system + types: + - python + require_serial: true + - id: pytest + name: Run pytest + entry: poetry run pytest tests + language: system + pass_filenames: false + stages: [pre-push] + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v5.0.0 + hooks: + - id: check-yaml + - id: check-added-large-files