Files
auto-archiver-api/.pre-commit-config.yaml
2025-03-10 12:45:19 -05:00

79 lines
2.0 KiB
YAML

repos:
- repo: https://github.com/nbQA-dev/nbQA
rev: 1.9.1
hooks:
- id: nbqa-ruff
args:
- --fix
- --target-version=py310
- --ignore=E721,E722
- --line-length=80
- id: nbqa-black
args:
- --line-length=80
- id: nbqa-isort
args:
- --float-to-top
- --profile=black
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: trailing-whitespace
- id: check-docstring-first
- id: check-executables-have-shebangs
- id: check-json
- id: check-case-conflict
- id: check-toml
- id: check-merge-conflict
- id: check-xml
- id: check-yaml
exclude: app/tests/user-groups.test.broken.yaml
- id: end-of-file-fixer
- id: check-symlinks
- id: mixed-line-ending
- id: sort-simple-yaml
- id: fix-encoding-pragma
args:
- --remove
- id: pretty-format-json
args:
- --autofix
- repo: https://github.com/pre-commit/pygrep-hooks
rev: v1.10.0
hooks:
- id: python-check-blanket-noqa
- id: python-check-mock-methods
- id: python-no-eval
- id: python-no-log-warn
- repo: https://github.com/PyCQA/isort
rev: 6.0.1
hooks:
- id: isort
name: Run isort to sort imports
files: \.py$
# To keep consistent with the global isort skip config defined in setup.cfg
exclude: ^build/.*$|^.tox/.*$|^venv/.*$
args:
- --lines-after-imports=2
- --profile=black
- --line-length=80
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.9.7
hooks:
- id: ruff
types_or: [python,pyi]
args:
- --fix
- --select=B,C,E,F,W,B9
- --line-length=80
- --ignore=E203,E402,E501,E261
- id: ruff-format
types_or: [ python,pyi]
args:
- --target-version=py310
- --line-length=80