Skip to content

Instantly share code, notes, and snippets.

@hartwork
Created January 10, 2019 21:58
Show Gist options
  • Save hartwork/b8d58cd1c731ca5dfda74047538e7e3f to your computer and use it in GitHub Desktop.
Save hartwork/b8d58cd1c731ca5dfda74047538e7e3f to your computer and use it in GitHub Desktop.
Sample .pre-commit-config.yaml of an actual Django project
exclude: ^myDjangoApp/static/
repos:
- repo: https://github.com/asottile/pyupgrade
rev: v1.11.0
hooks:
- id: pyupgrade
- repo: https://github.com/pre-commit/mirrors-autopep8
rev: v1.4.3
hooks:
- id: autopep8
args: ["-i", "--global-config", ".pycodestyle"]
exclude: '^myDjangoApp/migrations/[0-9]{4}_.+\.py'
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.0.0
hooks:
- id: check-json
- id: check-yaml
- id: check-merge-conflict
- id: end-of-file-fixer
- id: flake8
- id: trailing-whitespace
- repo: https://github.com/pre-commit/mirrors-isort
rev: v4.3.4
hooks:
- id: isort
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment