This repository has been archived by the owner on Aug 2, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 20
/
.pre-commit-config.yaml
executable file
·140 lines (126 loc) · 4.37 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
135
136
137
138
139
140
---
minimum_pre_commit_version: 2.4.0
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.0.1
hooks:
- id: check-merge-conflict # Check for files that contain merge conflict strings.
- id: trailing-whitespace
args: [--markdown-linebreak-ext=md]
- id: mixed-line-ending # Replaces or checks mixed line ending.
args: [--fix=lf]
- id: end-of-file-fixer
- id: fix-encoding-pragma
args: [--remove]
- id: check-yaml
- id: debug-statements
language_version: python3
# ----- Code Formatting ------------------------------------------------------------------------->
- repo: https://github.com/saltstack/pre-commit-remove-import-headers
rev: 1.1.0
hooks:
- id: remove-import-headers
- repo: https://github.com/asottile/pyupgrade
rev: v2.37.2
hooks:
- id: pyupgrade
name: Rewrite Code to be Py3.7+
args: [--py37-plus]
- repo: https://github.com/asottile/reorder_python_imports
rev: v2.6.0
hooks:
- id: reorder-python-imports
args: [--py37-plus]
- repo: https://github.com/psf/black
rev: 22.6.0
hooks:
- id: black
args: []
- repo: https://github.com/asottile/blacken-docs
rev: v1.12.1
hooks:
- id: blacken-docs
additional_dependencies: [black==22.6.0]
# <---- Code Formatting --------------------------------------------------------------------------
# ----- Static Code Analysis -------------------------------------------------------------------->
- repo: https://github.com/PyCQA/flake8
rev: 3.8.1
hooks:
- id: flake8
language_version: python3
additional_dependencies: [flake8-typing-imports==1.9.0]
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.782 # NOTE: keep this in sync with setup.py.
hooks:
- id: mypy
files: ^(src/|tests/).*\.py$
args: []
# <---- Static Code Analysis ---------------------------------------------------------------------
# ----- Static Requirements --------------------------------------------------------------------->
# ----- Testing Static Requirements ----------------------------------------------------------->
- repo: https://github.com/saltstack/pip-tools-compile-impersonate
rev: '4.8'
hooks:
- id: pip-tools-compile
alias: compile-3.7-test-requirements
name: Py3.7 Test Requirements
files: ^requirements/(base\.txt|tests\.in)$
pass_filenames: false
args:
- -v
- --py-version=3.7
- --platform=linux
- requirements/tests.in
- id: pip-tools-compile
alias: compile-3.8-test-requirements
name: Py3.8 Test Requirements
files: ^requirements/(base\.txt|tests\.in)$
pass_filenames: false
args:
- -v
- --py-version=3.8
- --platform=linux
- requirements/tests.in
- id: pip-tools-compile
alias: compile-3.9-test-requirements
name: Py3.9 Test Requirements
files: ^requirements/(base\.txt|tests\.in)$
pass_filenames: false
args:
- -v
- --py-version=3.9
- --platform=linux
- requirements/tests.in
- id: pip-tools-compile
alias: compile-3.10-test-requirements
name: Py3.10 Test Requirements
files: ^requirements/(base\.txt|tests\.in)$
pass_filenames: false
args:
- -v
- --py-version=3.10
- --platform=linux
- requirements/tests.in
- id: pip-tools-compile
alias: compile-3.11-test-requirements
name: Py3.11 Test Requirements
files: ^requirements/(base\.txt|tests\.in)$
pass_filenames: false
args:
- -v
- --py-version=3.11
- --platform=linux
- requirements/tests.in
- id: pip-tools-compile
alias: compile-3.12-test-requirements
name: Py3.12 Test Requirements
files: ^requirements/(base\.txt|tests\.in)$
pass_filenames: false
args:
- -v
- --py-version=3.12
- --platform=linux
- requirements/tests.in
# <---- Testing Static Requirements ------------------------------------------------------------
# <---- Static Requirements ----------------------------------------------------------------------
# vim: colorcolumn=100