.pre-commit-config.yaml•985 B
# Pre-commit hooks configuration
# See https://pre-commit.com for more information
repos:
# Ruff linter and formatter
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.12.0
hooks:
# Run the linter
- id: ruff
name: ruff-lint
args: [--fix]
types_or: [python, pyi, jupyter]
# Run the formatter
- id: ruff-format
name: ruff-format
types_or: [python, pyi, jupyter]
# Additional useful 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-toml
- id: check-merge-conflict
- id: check-added-large-files
- id: check-case-conflict
- id: debug-statements
# Check for Python syntax errors
- repo: https://github.com/pre-commit/pygrep-hooks
rev: v1.10.0
hooks:
- id: python-check-blanket-noqa
- id: python-no-log-warn