.pre-commit-config.yaml•2.56 kB
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
- 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=1000']
- id: check-json
- id: check-toml
- id: check-xml
- id: check-merge-conflict
- id: check-case-conflict
- id: check-docstring-first
- id: debug-statements
- id: detect-private-key
- id: fix-byte-order-marker
- id: mixed-line-ending
- id: name-tests-test
args: ['--pytest-test-first']
- repo: https://github.com/asottile/pyupgrade
rev: v3.20.0
hooks:
- id: pyupgrade
args: [--py311-plus]
- repo: https://github.com/psf/black
rev: 25.1.0
hooks:
- id: black
# Temporarily disabled due to NixOS compatibility issues
# - repo: https://github.com/astral-sh/ruff-pre-commit
# rev: v0.12.2
# hooks:
# - id: ruff
# args: [--fix, --exit-non-zero-on-fix]
# - id: ruff-format
- repo: https://github.com/pycqa/isort
rev: 6.0.1
hooks:
- id: isort
args: ["--profile", "black"]
# Temporarily disabled - too many type annotation issues to fix at once
# - repo: https://github.com/pre-commit/mirrors-mypy
# rev: v1.16.1
# hooks:
# - id: mypy
# additional_dependencies:
# - types-pyyaml
# - types-requests
# - pandas-stubs
# - sqlalchemy-stubs
# - types-click
# args: [--ignore-missing-imports]
- repo: https://github.com/PyCQA/bandit
rev: 1.8.6
hooks:
- id: bandit
args: ['-c', 'pyproject.toml', '-r', 'src/']
additional_dependencies: ["bandit[toml]"]
- repo: https://github.com/pycqa/pylint
rev: v3.3.7
hooks:
- id: pylint
args: [--rcfile=pyproject.toml]
- repo: https://github.com/commitizen-tools/commitizen
rev: v4.8.3
hooks:
- id: commitizen
stages: [commit-msg]
- repo: https://github.com/hadialqattan/pycln
rev: v2.5.0
hooks:
- id: pycln
args: [--all]
# Uncomment to run tests on every commit (can slow down commits)
# - repo: local
# hooks:
# - id: pytest-check
# name: pytest-check
# entry: pytest
# language: system
# pass_filenames: false
# always_run: true
# args: ["-m", "unit", "--no-cov"]