A pre-commit hook for djangofmt.
Distributed as a standalone repository to enable installing djangofmt via prebuilt wheels from PyPI.
Add the following to your .pre-commit-config.yaml:
repos:
- repo: https://github.com/UnknownPlatypus/djangofmt-pre-commit
rev: v0.2.11
hooks:
- id: djangofmtTo also lint your templates, add the djangofmt-check hook:
repos:
- repo: https://github.com/UnknownPlatypus/djangofmt-pre-commit
rev: v0.2.11
hooks:
- id: djangofmt
- id: djangofmt-checkPass args: [--fix] to djangofmt-check to apply safe fixes automatically.