# pre-commit hooks for Metasession SDLC (Python stack). # # Mirrors the husky setup used in the Node stack: # - commit-msg: conventional-commits enforcement # - pre-commit: ruff (lint + format), mypy, fast unit tests on staged # - pre-push: full unit suite + SAST + dep audit # # Install once after sync: `pre-commit install && pre-commit install --hook-type commit-msg` repos: - repo: https://github.com/astral-sh/ruff-pre-commit rev: v0.7.0 hooks: - id: ruff args: [--fix, --exit-non-zero-on-fix] - id: ruff-format - repo: https://github.com/pre-commit/mirrors-mypy rev: v1.12.0 hooks: - id: mypy additional_dependencies: [pydantic>=2.0, types-requests] args: [--strict] - repo: https://github.com/compilerla/conventional-pre-commit rev: v3.4.0 hooks: - id: conventional-pre-commit stages: [commit-msg] args: [] - repo: https://github.com/pre-commit/pre-commit-hooks rev: v5.0.0 hooks: - id: trailing-whitespace - id: end-of-file-fixer - id: check-yaml - id: check-toml - id: check-added-large-files args: [--maxkb=500] - id: check-merge-conflict - id: detect-private-key - repo: local hooks: - id: pytest-fast name: pytest (fast tests only) entry: pytest -m "not slow" --tb=short -q language: system pass_filenames: false stages: [pre-push]