-
Notifications
You must be signed in to change notification settings - Fork 1
/
.pre-commit-config.yaml
102 lines (89 loc) · 2.86 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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
---
exclude: '^docs/conf.py'
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: c4a0b883114b00d8d76b479c820ce7950211c99b # frozen: v4.5.0
hooks:
- id: trailing-whitespace
- id: check-added-large-files
- id: check-ast
- id: check-json
- id: check-merge-conflict
- id: check-xml
- id: check-yaml
- id: debug-statements
- id: end-of-file-fixer
- id: requirements-txt-fixer
- id: mixed-line-ending
args: ['--fix=lf']
- id: no-commit-to-branch
args:
- --branch=dev
- --branch=master
- --branch=main
- --branch=rc
- --branch=production
- repo: https://github.com/jorisroovers/gitlint
rev: acc9d9de6369b76d22cb4167029d2035e8730b98 # frozen: v0.19.1
hooks:
- id: gitlint
- repo: https://github.com/adrienverge/yamllint.git
rev: dd99a1c965b56027e9773442f41d3c58cc53c690 # frozen: v1.34.0
hooks:
- id: yamllint
types: [yaml]
## If you want to automatically "modernize" your Python code:
# - repo: https://github.com/asottile/pyupgrade
# rev: v3.3.1
# hooks:
# - id: pyupgrade
# args: ['--py37-plus']
## If you want to avoid flake8 errors due to unused vars or imports:
# - repo: https://github.com/PyCQA/autoflake
# rev: v2.0.0
# hooks:
# - id: autoflake
# args: [
# --in-place,
# --remove-all-unused-imports,
# --remove-unused-variables,
# ]
- repo: https://github.com/PyCQA/isort
rev: c235f5e450b4b84e58d114ed4c589cbf454175a3 # frozen: 5.13.2
hooks:
- id: isort
- repo: https://github.com/psf/black
rev: e026c93888f91a47a9c9f4e029f3eb07d96375e6 # frozen: 24.1.1
hooks:
- id: black
language_version: python3
## If like to embrace black styles even in the docs:
# - repo: https://github.com/asottile/blacken-docs
# rev: v1.13.0
# hooks:
# - id: blacken-docs
# additional_dependencies: [black]
- repo: https://github.com/PyCQA/flake8
rev: 7d37d9032d0d161634be4554273c30efd4dea0b3 # frozen: 7.0.0
hooks:
- id: flake8
args: ["--max-line-length=120"]
additional_dependencies: [Flake8-pyproject]
## Check for misspells in documentation files:
# - repo: https://github.com/codespell-project/codespell
# rev: v2.2.2
# hooks:
# - id: codespell
- repo: https://github.com/pre-commit/mirrors-mypy
rev: 8cd2d4056637e242709fe09f15a36f0b4b682bda # frozen: v1.8.0
hooks:
- id: mypy
- repo: https://github.com/btford/write-good
rev: ab66ce10136dfad5146e69e70f82a3efac8842c1 # frozen: v1.0.8
hooks:
- id: write-good
files: "\\.(rst|md|markdown|mdown|mkdn)$"
- repo: https://github.com/rhysd/actionlint
rev: ea8102762106cdca9c88829f1295b39a544706f3 # frozen: v1.6.26
hooks:
- id: actionlint