.pre-commit-config.yaml•1.39 kB
# Pre-commit hooks configuration
repos:
# Black - Python code formatter
- repo: https://github.com/psf/black
rev: '24.10.0'
hooks:
- id: black
language_version: python3
args: ['--line-length=120']
# isort - Import sorting
- repo: https://github.com/pycqa/isort
rev: '5.13.2'
hooks:
- id: isort
args: ['--profile', 'black', '--line-length=120']
# flake8 - Linting
- repo: https://github.com/pycqa/flake8
rev: '7.1.1'
hooks:
- id: flake8
args: ['--max-line-length=120', '--extend-ignore=E203,W503', '--per-file-ignores=tests/*:F401,F841']
# mypy - Static type checking (disabled for now due to extensive type annotation needs)
# Uncomment when ready to fix all type issues
# - repo: https://github.com/pre-commit/mirrors-mypy
# rev: 'v1.13.0'
# hooks:
# - id: mypy
# additional_dependencies: [types-requests]
# args: ['--ignore-missing-imports', '--no-strict-optional', '--explicit-package-bases']
# exclude: '^tests/'
# Additional useful 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-toml
- id: check-merge-conflict
- id: check-added-large-files
args: ['--maxkb=1000'] # 1MB limit