-
Notifications
You must be signed in to change notification settings - Fork 2
/
.pre-commit-config.yaml
67 lines (67 loc) · 2.05 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
# Apply to all files without committing:
# pre-commit run --all-files
# Update this file:
# pre-commit autoupdate
repos:
- repo: meta
hooks:
- id: check-useless-excludes
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: check-ast
- id: check-case-conflict
- id: check-executables-have-shebangs
- id: check-json
- id: check-merge-conflict
- id: check-toml
- id: check-vcs-permalinks
- id: check-yaml
- id: debug-statements
- id: detect-private-key
- id: end-of-file-fixer
- id: fix-byte-order-marker
- id: fix-encoding-pragma
args: [--remove]
- id: forbid-submodules
- id: mixed-line-ending
args: [--fix=lf]
exclude: docs/make\.bat
- id: requirements-txt-fixer
- id: trailing-whitespace
- repo: https://github.com/psf/black
rev: 23.3.0
hooks:
- id: black
- repo: https://github.com/pycqa/isort
# Newer versions do not support Python 3.7
rev: 5.11.5
hooks:
- id: isort
name: isort (python)
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v2.7.1
hooks:
- id: prettier
# Older LTS version needed to run on CentOS 7 (e.g., Frontera)
language_version: 16.20.1
# Workaround from https://github.com/pre-commit/mirrors-prettier/issues/29#issuecomment-1332667344
additional_dependencies:
- repo: https://github.com/codespell-project/codespell
rev: v2.2.5
hooks:
- id: codespell
additional_dependencies:
- tomli==2.0.1
- repo: https://github.com/shellcheck-py/shellcheck-py # Unofficial but maintained by asottile
rev: v0.9.0.5
hooks:
- id: shellcheck
- repo: https://github.com/pycqa/flake8
# Newer versions do not support Python 3.7
rev: 5.0.4
hooks:
- id: flake8
additional_dependencies: ["flake8-bugbear==23.3.12"]
args: ["--max-line-length=150", "--ignore=E203,W503", "--per-file-ignores=__init__.py:F401"]