Skip to content

Instantly share code, notes, and snippets.

@hartwork
Created January 10, 2019 21:58
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
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