-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-config.yaml
82 lines (74 loc) · 2.01 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
# Apply to all files without committing:
# pre-commit run --all-files
# Update this file:
# pre-commit autoupdate
repos:
# format markdown files
- repo: https://github.com/pre-commit/mirrors-prettier
rev: "v3.0.0-alpha.0"
hooks:
- id: prettier
types: [markdown]
args: ["--prose-wrap", "always", "--print-width", "100"]
# Autofix coding style
- repo: https://github.com/psf/black
rev: 22.6.0
hooks:
- id: black
# Complain about coding style that black can't fix
- repo: https://github.com/PyCQA/flake8
rev: 5.0.4
hooks:
- id: flake8
additional_dependencies:
- flake8-unused-arguments
- flake8-bugbear
- pep8-naming
- flake8-annotations
- flake8-builtins
- flake8-docstrings
- pandas-vet
- darglint
# Sort order of imports
- repo: https://github.com/pycqa/isort
rev: 5.10.1
hooks:
- id: isort
name: isort
# Check typehints
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.971
hooks:
- id: mypy
args: [--ignore-missing-imports, --show-error-codes]
# Fix coding patterns from old Python versions
- repo: https://github.com/asottile/pyupgrade
rev: v2.37.3
hooks:
- id: pyupgrade
args: [--py37-plus]
# Misc checks
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
hooks:
- id: check-json
- id: check-yaml
args: [--allow-multiple-documents]
- id: debug-statements
- id: check-merge-conflict
- id: check-added-large-files
args: ["--maxkb=1000"]
- id: detect-aws-credentials
args: [--allow-missing-credentials]
- id: detect-private-key
# Linting on Dockerfile
- repo: https://github.com/AleksaC/hadolint-py
rev: v2.10.0
hooks:
- id: hadolint
# Check security issues
- repo: https://github.com/PyCQA/bandit
rev: "1.7.4"
hooks:
- id: bandit
args: ["--exclude", "tests"]