modern-python-mwe/.pre-commit-config.yaml

27 lines
710 B
YAML

# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
fail_fast: false
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: trailing-whitespace
exclude: .*\.(md|json)
- id: end-of-file-fixer
exclude: .*\.(json)
- id: check-yaml
- id: check-json
- id: check-added-large-files
args: [--maxkb=5120] # 2 MB
- repo: https://github.com/psf/black
rev: 23.11.0
hooks:
- id: black
name: Formatting
- repo: https://github.com/pycqa/isort
rev: 5.12.0
hooks:
- id: isort
name: Import order
args: ["--profile=black"]