-
-
Notifications
You must be signed in to change notification settings - Fork 12
/
.pre-commit-config.yaml
134 lines (124 loc) · 3.12 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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
---
# .pre-commit-config.yaml
# ========================
#
# pre-commit clean
# pre-commit install
# pre-commit install-hooks
#
# precommit hooks installation
#
# - pre-commit autoupdate
#
# - pre-commit run black
#
# continuous integration
# ======================
#
# - pre-commit run --all-files
#
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-docstring-first
- id: debug-statements
- id: check-merge-conflict
- id: sort-simple-yaml
- id: requirements-txt-fixer
- id: fix-encoding-pragma
args: ["--remove"]
- id: forbid-new-submodules
- id: mixed-line-ending
args: ["--fix=lf"]
description: Forces to replace line ending by the UNIX 'lf' character.
- id: check-added-large-files
args: ["--maxkb=500"]
- id: check-yaml
- id: check-json
files: ^tests/app/
- id: pretty-format-json
args: ["--no-sort-keys", "--autofix"]
files: ^tests/app/
- id: check-ast
- repo: meta
hooks:
- id: check-useless-excludes
- repo: https://github.com/psf/black
rev: 24.10.0
hooks:
- id: black
args: [--safe, --quiet, --line-length=119]
- repo: https://github.com/PyCQA/flake8
rev: 7.1.1
hooks:
- id: flake8
- repo: https://github.com/pre-commit/mirrors-autopep8
rev: v2.0.4
hooks:
- id: autopep8
- repo: https://github.com/pycqa/isort
rev: 5.13.2
hooks:
- id: isort
name: isort (python)
- id: isort
name: isort (cython)
types: [cython]
- id: isort
name: isort (pyi)
types: [pyi]
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.13.0
hooks:
- id: mypy
name: mypy
entry: mypy
language: python
types: [python]
args: ["--ignore-missing-imports", "--scripts-are-modules", "--config-file=mypy.ini"]
require_serial: true
additional_dependencies: [
types-click==7.1.2,
types-freezegun==0.1.4
]
- repo: local
hooks:
- id: pylint
name: pylint
entry: pylint
language: system
types: [python]
exclude: tests
- repo: https://github.com/PyCQA/bandit
rev: 1.8.0
hooks:
- id: bandit
description: Security oriented static analyser for python code
exclude: ^tests/
- repo: https://github.com/jendrikseipp/vulture
rev: v2.14
hooks:
- id: vulture
description: Find dead Python code
entry: vulture
args: [
"--min-confidence", "90",
"--exclude", "*env*",
".",
]
- repo: https://github.com/codespell-project/codespell
rev: v2.3.0
hooks:
- id: codespell
name: codespell
description: Checks for common misspellings in text files.
entry: codespell reviews
language: python
types: [text]
- repo: https://github.com/asottile/pyupgrade
rev: v3.19.0
hooks:
- id: pyupgrade