-
Notifications
You must be signed in to change notification settings - Fork 3
/
.pre-commit-config.yaml
63 lines (63 loc) · 1.76 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
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: trailing-whitespace # Trailing whitespace checker
- id: end-of-file-fixer # Ensure files end in a newline
- id: check-json
- id: check-yaml # Check YAML files for syntax errors only
args: [--unsafe, --allow-multiple-documents]
- id: check-toml
# - id: check-added-large-files
- id: debug-statements # Check for debugger imports and py37+ breakpoint()
- id: mixed-line-ending
- id: no-commit-to-branch # Prevent committing to main / master
- id: check-merge-conflict # Check for files that contain merge conflict
exclude: /README\.rst$|^docs/.*\.rst$
- repo: https://github.com/PyCQA/isort
rev: 5.13.2
hooks:
- id: isort
args:
- -l 120
- --force-single-line-imports
- --profile black
- repo: https://github.com/psf/black
rev: 24.8.0
hooks:
- id: black
args: [--line-length=120]
- repo: https://github.com/keewis/blackdoc
rev: v0.3.8
hooks:
- id: blackdoc
additional_dependencies: [black==23.3.0]
exclude: xr_engine_profile_rst\.py
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.6.9
hooks:
- id: ruff
exclude: '(dev/.*|.*_)\.py$'
args:
- --line-length=120
- --fix
- --exit-non-zero-on-fix
- --preview
- repo: https://github.com/executablebooks/mdformat
rev: 0.7.14
hooks:
- id: mdformat
exclude: cruft-update-template.md
- repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks
rev: v2.11.0
hooks:
- id: pretty-format-yaml
args: [--autofix, --preserve-quotes]
- repo: https://github.com/sphinx-contrib/sphinx-lint
rev: v1.0.0
hooks:
- id: sphinx-lint
- repo: https://github.com/tox-dev/pyproject-fmt
rev: "2.2.4"
hooks:
- id: pyproject-fmt