Add a --remove option to fix-encoding-pragma

This commit is contained in:
Anthony Sottile 2016-04-27 11:18:14 -07:00
parent 17478a0a50
commit 03bf17f2b0
3 changed files with 120 additions and 48 deletions

View file

@ -45,7 +45,8 @@ Add this to your `.pre-commit-config.yaml`
- `double-quote-string-fixer` - This hook replaces double quoted strings
with single quoted strings.
- `end-of-file-fixer` - Makes sure files end in a newline and only a newline.
- `fix-encoding-pragma` - Add `# -*- coding: utf-8 -*-` to the top of python files
- `fix-encoding-pragma` - Add `# -*- coding: utf-8 -*-` to the top of python files.
- To remove the coding pragma pass `--remove` (useful in a python3-only codebase)
- `flake8` - Run flake8 on your python files.
- `name-tests-test` - Assert that files in tests/ end in `_test.py`.
- Use `args: ['--django']` to match `test*.py` instead.