-
Notifications
You must be signed in to change notification settings - Fork 1
/
.pre-commit-config.yaml
31 lines (28 loc) · 1.51 KB
/
.pre-commit-config.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
---
minimum_pre_commit_version: 1.15.2
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: check-merge-conflict # Check for files that contain merge conflict strings.
- id: trailing-whitespace # Trims trailing whitespace (Markdown specific).
args: [ --markdown-linebreak-ext=md ]
- id: mixed-line-ending # Replaces or checks mixed line endings (converts to LF).
args: [ --fix=lf ]
- id: end-of-file-fixer # Ensures files end with a newline and only a newline.
- id: check-ast # Simply check whether files parse as valid Python.
- id: requirements-txt-fixer # Sorts entries in requirements.txt and removes incorrect entries.
- id: check-toml # Checks TOML files for correctness.
- id: check-yaml # Checks YAML files for syntax errors.
- id: forbid-submodules # Forbids the addition of new submodules.
- id: pretty-format-json # Automatically formats JSON files (with autofix enabled).
args: [ --autofix ]
- repo: https://github.com/asottile/pyupgrade
rev: v3.10.1
hooks:
- id: pyupgrade # Automatically upgrades Python syntax to newer versions.
- repo: https://github.com/psf/black
rev: 23.9.1
hooks:
- id: black # Automatically formats Python code to follow PEP 8.
exclude: 'migrations/.*|templates/.*'