diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..21e96dd --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,32 @@ +# Pre-commit hooks for chat-handler +# Install: pip install pre-commit && pre-commit install +# Run: pre-commit run --all-files + +repos: + # Ruff - fast Python linter and formatter + - repo: https://github.com/astral-sh/ruff-pre-commit + rev: v0.4.4 + hooks: + - id: ruff + args: [--fix, --exit-non-zero-on-fix] + - id: ruff-format + + # Standard pre-commit hooks + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v4.6.0 + hooks: + - id: trailing-whitespace + - id: end-of-file-fixer + - id: check-yaml + - id: check-added-large-files + args: [--maxkb=500] + - id: check-merge-conflict + - id: detect-private-key + + # Type checking (optional - uncomment when ready) + # - repo: https://github.com/pre-commit/mirrors-mypy + # rev: v1.10.0 + # hooks: + # - id: mypy + # additional_dependencies: [types-all] + # args: [--ignore-missing-imports]