-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.pre-commit-config.yaml
71 lines (71 loc) · 2.13 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
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: check-json
files: \.(json)$
- id: check-yaml
- id: check-toml
- id: check-merge-conflict
- id: end-of-file-fixer
- id: trailing-whitespace
exclude: tests/test_myst_nb/.*\.xml
- repo: https://github.com/python/black
rev: 22.3.0
hooks:
- id: black-jupyter
args: ["--config=pyproject.toml"]
pass_filenames: true
- repo: https://github.com/pycqa/isort
rev: 5.12.0
hooks:
- id: isort
args: ["--settings-path=pyproject.toml"]
- repo: https://github.com/executablebooks/mdformat
rev: 0.7.14
hooks:
- id: mdformat
additional_dependencies:
- mdformat-beautysh
- mdformat-black
- mdformat-frontmatter
- mdformat-toc
- mdformat-gfm
args: ["--number", "--wrap", "keep"]
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.10.0
hooks:
- id: mypy
args: ["--install-types", "--non-interactive"]
additional_dependencies: ["bokeh>=3.3.4", "sphinx>=7.2.6"]
exclude: >
(?x)^(
tests/.*\.py
)$
- repo: https://github.com/pdm-project/pdm
rev: 2.15.4
hooks:
- id: pdm-lock-check
- repo: https://github.com/hadialqattan/pycln
rev: v1.3.2
hooks:
- id: pycln
args: ["--config=pyproject.toml"]
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.4.10
hooks:
# Run the linter.
- id: ruff
types_or: [python, pyi, jupyter]
# Run the formatter.
- id: ruff-format
types_or: [python, pyi, jupyter]
- repo: https://github.com/jumanjihouse/pre-commit-hook-yamlfmt
rev: 0.2.3
hooks:
- id: yamlfmt
# TODO: Once supported, change --preserve-quotes to enforce double quotes, see
# https://github.com/jumanjihouse/pre-commit-hook-yamlfmt/issues/53
args: ["--mapping", "2", "--sequence", "4", "--offset", "2", "--width", "100", "--preserve-quotes",
"--implicit_start", "--implicit_end"]