-
Notifications
You must be signed in to change notification settings - Fork 7
/
.pre-commit-config.yaml
93 lines (85 loc) · 2.65 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
83
84
85
86
87
88
89
90
91
92
93
# Install the pre-commit hooks below with
# 'pre-commit install'
# Auto-update the version of the hooks with
# 'pre-commit autoupdate'
# Run the hooks on all files with
# 'pre-commit run --all'
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
hooks:
- id: check-ast
files: (renderer/|examples/|test_resources/tests/).*.py$
- id: check-case-conflict
- id: check-merge-conflict
- id: check-symlinks
- id: check-toml
- id: check-vcs-permalinks
- id: check-yaml
- id: debug-statements
files: (renderer/|examples/|test_resources/tests/).*.py$
- id: destroyed-symlinks
- id: end-of-file-fixer
- id: fix-byte-order-marker
- id: fix-encoding-pragma
files: (renderer/|examples/|test_resources/tests/)*.py$
args: [--remove]
- id: mixed-line-ending
args: [--fix=lf]
- id: no-commit-to-branch
args: [--branch=master]
- id: trailing-whitespace
files: (renderer/|examples/|test_resources/tests/).*.py$
- repo: https://github.com/PyCQA/isort
rev: "5.12.0"
hooks:
- id: isort
files: (renderer/|examples/|test_resources/tests/).*.py$
args:
[
--only-modified,
--combine-star,
--order-by-type,
--use-parentheses,
--case-sensitive,
--force-sort-within-sections,
]
- repo: https://github.com/psf/black
# The `refs/tags/<tag>:refs/tags/<tag>` is needed for black's required-version to work:
# https://github.com/psf/black/issues/2493#issuecomment-1081987650
rev: "refs/tags/23.7.0:refs/tags/23.7.0"
hooks:
- id: black
files: (renderer/|examples/|test_resources/tests/).*.py$
language_version: python3.11
- repo: https://github.com/RobertCraigie/pyright-python
rev: v1.1.317
hooks:
- id: pyright
files: (renderer/|examples/|test_resources/tests/).*.py$
additional_dependencies:
[
jax==0.4.13,
jaxlib==0.4.13,
jaxtyping==0.2.19,
numpy==1.24.3,
typing_extensions==4.3.0,
]
- repo: https://github.com/tox-dev/tox-ini-fmt
rev: "1.3.1"
hooks:
- id: tox-ini-fmt
- repo: https://github.com/streetsidesoftware/cspell-cli
rev: "v6.31.0"
hooks:
- id: cspell
exclude: (\.gitignore|tests/.*|\.pre-commit-config\.yaml|\.pyi|\.style\.yapf|tox\.ini)$
args:
[
--unique,
--cache,
--no-must-find-files,
--no-progress,
--no-summary,
--gitignore,
]