Skip to content

Commit 34403ad

Browse files
committed
Add pre-commit
Useful for linters. Signed-off-by: Stephen Finucane <[email protected]>
1 parent eab5453 commit 34403ad

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed

.pre-commit-config.yaml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
repos:
2+
- repo: https://github.com/astral-sh/ruff-pre-commit
3+
rev: v0.0.284
4+
hooks:
5+
- id: ruff
6+
args: ['--diff', '--format', 'github']
7+
8+
- repo: https://github.com/pycqa/flake8
9+
rev: 6.1.0
10+
hooks:
11+
- id: flake8
12+
additional_dependencies:
13+
- flake8-simplify
14+
15+
- repo: https://github.com/pycqa/isort
16+
rev: 5.12.0
17+
hooks:
18+
- id: isort
19+
name: isort (python)
20+
21+
- repo: https://github.com/pre-commit/mirrors-mypy
22+
rev: v1.5.0
23+
hooks:
24+
- id: mypy
25+
additional_dependencies:
26+
- docutils-stubs
27+
- types-requests
28+
files: ^sphinx/
29+
30+
- repo: https://github.com/sphinx-contrib/sphinx-lint
31+
rev: v0.6.8
32+
hooks:
33+
- id: sphinx-lint
34+
args: ['--enable', 'line-too-long', '--max-line-length', '85']
35+
files: |
36+
(?x)^(
37+
CHANGES
38+
| CONTRIBUTING.rst
39+
| README.rst
40+
| doc/.*
41+
)

0 commit comments

Comments
 (0)