-
Notifications
You must be signed in to change notification settings - Fork 1
/
.pre-commit-config.yaml
82 lines (82 loc) · 2.23 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
---
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0 # Use the ref you want to point at
hooks:
- id: trailing-whitespace
exclude: |
(?x)^(
.*\.py
)$
- id: check-added-large-files
- id: debug-statements
- id: detect-private-key
- id: end-of-file-fixer
- id: mixed-line-ending
exclude: |
(?x)^(
.*\.py
)$
- id: check-case-conflict
exclude: |
(?x)^(
.*\.py
)$
- id: check-json
- id: check-merge-conflict
- id: check-toml
- id: check-xml
- id: requirements-txt-fixer
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.2.2
hooks:
# Run the linter.
- id: ruff
types_or: [python, pyi, jupyter]
args: [--fix]
exclude: |
(?x)^(
.*[Tt]est.*|
__init__.py
)$
# Run the formatter.
- id: ruff-format
types_or: [python, pyi, jupyter]
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.8.0
hooks:
- id: mypy
exclude: |
(?x)^(
.*[Tt]est.*
)$
args: [--ignore-missing-imports, --explicit-package-bases]
- repo: https://github.com/scop/pre-commit-shfmt
rev: v3.8.0-1
hooks:
# Choose one of:
- id: shfmt # prebuilt upstream executable
args: [--indent=4, -w, -s]
# - id: shfmt-src # build from source (requires/installs Go to build)
# - id: shfmt-docker # Docker image (requires Docker to run)
- repo: https://github.com/shellcheck-py/shellcheck-py
rev: v0.9.0.6
hooks:
- id: shellcheck
args: [--severity=warning]
- repo: https://github.com/adrienverge/yamllint.git
rev: v1.35.1 # or higher tag
hooks:
- id: yamllint
args:
[
--strict,
"--config-data={extends: relaxed, rules: {line-length: {max: 120}}}",
]
- repo: https://github.com/pre-commit/pygrep-hooks
rev: v1.10.0 # Use the ref you want to point at
hooks:
- id: rst-backticks
- id: rst-directive-colons
- id: rst-inline-touching-normal