-
Notifications
You must be signed in to change notification settings - Fork 38
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
154 lines (154 loc) · 5.15 KB
/
.pre-commit-config.yaml
File metadata and controls
154 lines (154 loc) · 5.15 KB
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
141
142
143
144
145
146
147
148
149
150
151
152
153
154
---
repos:
- repo: local
hooks:
# pre-commit-hooks (pip: pre-commit-hooks==6.0.0, MIT License)
- id: trailing-whitespace
name: trailing-whitespace
language: python
entry: trailing-whitespace-fixer
types: [text]
additional_dependencies: ['pre-commit-hooks==6.0.0']
- id: mixed-line-ending
name: mixed-line-ending
language: python
entry: mixed-line-ending
types: [text]
args: ['--fix', 'lf']
exclude: '.*\.(svg)$'
additional_dependencies: ['pre-commit-hooks==6.0.0']
- id: fix-byte-order-marker
name: fix-byte-order-marker
language: python
entry: fix-byte-order-marker
types: [text]
additional_dependencies: ['pre-commit-hooks==6.0.0']
- id: check-executables-have-shebangs
name: check-executables-have-shebangs
language: python
entry: check-executables-have-shebangs
types: [text, executable]
additional_dependencies: ['pre-commit-hooks==6.0.0']
- id: check-shebang-scripts-are-executable
name: check-shebang-scripts-are-executable
language: python
entry: check-shebang-scripts-are-executable
types: [text]
additional_dependencies: ['pre-commit-hooks==6.0.0']
- id: check-yaml
name: check-yaml
language: python
entry: check-yaml
types: [yaml]
files: .*\.(yaml|yml)$
additional_dependencies: ['pre-commit-hooks==6.0.0']
- id: check-json
name: check-json
language: python
entry: check-json
types: [json]
files: .*\.json$
exclude: .*-curl.*\.json$
additional_dependencies: ['pre-commit-hooks==6.0.0']
- id: check-ast
name: check-ast
language: python
entry: check-ast
types: [python]
additional_dependencies: ['pre-commit-hooks==6.0.0']
- id: check-added-large-files
name: check-added-large-files
language: python
entry: check-added-large-files
additional_dependencies: ['pre-commit-hooks==6.0.0']
- id: check-case-conflict
name: check-case-conflict
language: python
entry: check-case-conflict
additional_dependencies: ['pre-commit-hooks==6.0.0']
- id: detect-private-key
name: detect-private-key
language: python
entry: detect-private-key
types: [text]
additional_dependencies: ['pre-commit-hooks==6.0.0']
- id: check-merge-conflict
name: check-merge-conflict
language: python
entry: check-merge-conflict
types: [text]
exclude: '.*\.(rst|inc)$'
additional_dependencies: ['pre-commit-hooks==6.0.0']
- id: debug-statements
name: debug-statements
language: python
entry: debug-statement-hook
types: [python]
additional_dependencies: ['pre-commit-hooks==6.0.0']
- id: check-docstring-first
name: check-docstring-first
language: python
entry: check-docstring-first
types: [python]
additional_dependencies: ['pre-commit-hooks==6.0.0']
# ruff (replaces astral-sh/ruff-pre-commit)
- id: ruff-check
name: ruff-check
language: python
entry: ruff check --force-exclude
types_or: [python, pyi, jupyter]
args: ['--fix', '--unsafe-fixes']
require_serial: true
additional_dependencies: ['ruff==0.15.7']
- id: ruff-format
name: ruff-format
language: python
entry: ruff format --force-exclude
types_or: [python, pyi, jupyter]
require_serial: true
additional_dependencies: ['ruff==0.15.7']
# hacking (unchanged — already local)
- id: hacking
name: hacking
language: python
description: 'Runs hacking, the OpenStack blend of flake8'
types: [python]
entry: flake8
require_serial: true
additional_dependencies: ['hacking===8.0.0']
exclude: '^(doc|releasenotes|tools)/.*$'
# bandit (replaces PyCQA/bandit)
- id: bandit
name: bandit
language: python
entry: bandit
types: [python]
require_serial: true
args: ['-c', 'pyproject.toml']
additional_dependencies: ['bandit[toml]==1.9.4']
# codespell (replaces codespell-project/codespell)
- id: codespell
name: codespell
language: python
entry: codespell
types: [text]
args: ['--ignore-words=doc/dictionary.txt']
additional_dependencies: ['codespell==2.4.2']
# sphinx-lint (replaces sphinx-contrib/sphinx-lint)
- id: sphinx-lint
name: sphinx-lint
language: python
entry: sphinx-lint
types: [rst]
require_serial: true
args: [--enable=default-role]
files: ^doc/|^releasenotes/|^api-guide/
additional_dependencies: ['sphinx-lint==1.0.2']
# doc8 (replaces PyCQA/doc8)
- id: doc8
name: doc8
language: python
entry: python -m doc8
files: \.rst$
require_serial: true
additional_dependencies: ['doc8==2.0.0']