-
Notifications
You must be signed in to change notification settings - Fork 53
/
.pre-commit-config.yaml
67 lines (61 loc) · 1.75 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
repos:
# Pip Audit
- repo: https://github.com/pypa/pip-audit
rev: v2.7.3
hooks:
- id: pip-audit
name: pip-audit
description: "Audits Python environments and dependency trees for known vulnerabilities"
entry: pip-audit
pass_filenames: false
language: python
# Generic
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: end-of-file-fixer
name: fix end of files
description: "Ensures that a file is either empty, or ends with one newline"
entry: end-of-file-fixer
types: [ text ]
stages: [ pre-commit, pre-push, manual ]
language: python
- id: trailing-whitespace
name: trim trailing whitespace
description: "Trims trailing whitespace"
entry: trailing-whitespace-fixer
types: [ text ]
stages: [ pre-commit ]
language: python
# TOML
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: check-toml
name: check toml
description: "Checks .toml files for parseable syntax"
entry: check-toml
types: [toml]
language: python
# YAML
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: check-yaml
name: check yaml
description: "Checks .yaml files for parseable syntax"
entry: check-yaml
types: [ yaml ]
language: python
# YAPF
- repo: https://github.com/google/yapf
rev: v0.40.2
hooks:
- id: yapf
name: yapf
description: "A formatter for Python files"
entry: yapf
args: [ -i ] # inplace
language: python
types: [ python ]
additional_dependencies: [ toml ]