.pre-commit-config.yaml•980 B
# Pre-commit hooks for code quality
# Install: pip install pre-commit && pre-commit install
# Run manually: pre-commit run --all-files
repos:
# Ruff - Fast Python linter and formatter
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.14.3
hooks:
# Format code
- id: ruff-format
args: []
# Lint code with auto-fixes
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
# Type checking with pyright
- repo: local
hooks:
- id: pyright
name: pyright
entry: pyright
language: system
types: [python]
pass_filenames: false
# General pre-commit hooks
- 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-added-large-files
args: [--maxkb=500]
- id: check-merge-conflict
- id: check-toml
- id: mixed-line-ending