-
Notifications
You must be signed in to change notification settings - Fork 2
/
.pre-commit-config.yaml
46 lines (42 loc) · 1.23 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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
default_language_version:
python: python3
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.4.0
hooks:
- id: trailing-whitespace
exclude: >
(?x)^(
tests/|
)$
- id: check-json
- id: end-of-file-fixer
- id: requirements-txt-fixer
- repo: https://github.com/psf/black
rev: 22.6.0
hooks:
- id: black
args: [--line-length=120]
exclude: >
(?x)^(
.github/
)$
- repo: https://gitlab.com/pycqa/flake8
rev: 3.9.0
hooks:
- id: flake8
args: [--max-line-length=120]
- repo: https://github.com/pre-commit/mirrors-isort
rev: v5.8.0
hooks:
- id: isort
# Custom hook - Comment out html livejs script - (uses "django comment" to comment out script tag)
# https://stackoverflow.com/questions/59499061/how-to-run-custom-shell-script-file-before-pre-commit-hook
- repo: local
hooks:
- id: livejs-comment
name: livejs-comment
entry: bash -c "find . -path '*base.html' | xargs sudo sed -ri 's/^(\s*)(<script.*livejs.*script>)/\1\{\# \2 \#\}/' "
language: system
types: [html]
pass_filenames: false