-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.pre-commit-config.yaml
70 lines (65 loc) · 2.07 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
minimum_pre_commit_version: 2.15.0
exclude: (html|csv|svg)$
default_stages: [
commit,
merge-commit,
push,
prepare-commit-msg,
commit-msg,
post-checkout,
post-commit,
post-merge,
post-rewrite
]
ci:
autofix_prs: false
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
hooks:
- id: trailing-whitespace
description: "Trims trailing whitespace and ensures files end in a newline."
- id: end-of-file-fixer
description: "Makes sure files end in a newline and only a newline."
- id: check-yaml
description: "Checks that all yaml files are valid."
- id: check-added-large-files
description: "Checks for large files being added to git"
args: ['--maxkb=1000']
- id: check-ast
description: "Checks that python files parse with both ast and built-in parse."
- id: check-json
description: "Check that JSON files are valid."
- id: check-merge-conflict
description: "Check for files that contain merge conflict strings."
- id: detect-private-key
description: "Detects the presence of private keys in any of the files in the repo."
- repo: https://github.com/pycqa/pylint
rev: v2.16.2
hooks:
- id: pylint
name: pylint
description: "Pylint: python code static checker"
stages: [manual]
- repo: https://github.com/psf/black
rev: 23.1.0
hooks:
- id: black
name: black
description: "Black: The uncompromising Python code formatter"
require_serial: true
types_or: [python, pyi]
files: .
- repo: https://github.com/PyCQA/isort
rev: 5.12.0
hooks:
- id: isort
name: isort
description: "isort: a Python utility / library to sort imports."
- repo: https://github.com/asottile/pyupgrade
rev: v3.3.1
hooks:
- id: pyupgrade
name: pyupgrade
description: "pyupgrade: A tool (and pre-commit hook) to automatically upgrade syntax for newer versions of the language."
args: [--py37-plus]