forked from jax-ml/jax
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
52 lines (46 loc) · 1.44 KB
/
Copy path.pre-commit-config.yaml
File metadata and controls
52 lines (46 loc) · 1.44 KB
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
# 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: cef0300fd0fc4d2a87a85fa2093c6b283ea36f4b # frozen: v5.0.0
hooks:
- id: check-ast
- id: check-merge-conflict
- id: check-toml
- id: check-yaml
exclude: |
(?x)^(
examples/k8s/svc-acct\.yaml |
ci/k8s/indexed-job\.yaml
)$
- id: end-of-file-fixer
# only include python files
files: \.py$
- id: debug-statements
# only include python files
files: \.py$
- id: trailing-whitespace
# only include python files
files: \.py$
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: 24e02b24b8ab2b7c76225602d13fa60e12d114e6 # frozen: v0.11.9
hooks:
- id: ruff
- repo: https://github.com/pre-commit/mirrors-mypy
rev: '7010b10a09f65cd60a23c207349b539aa36dbec1' # frozen: v1.16.0
hooks:
- id: mypy
files: (jax/|tests/typing_test\.py)
exclude: jax/_src/basearray.py|jax/numpy/__init__.py|jax/nn/__init__.py|jaxlib/_jax/.* # Use pyi instead
additional_dependencies: [types-requests==2.31.0, numpy>=2.2.0]
args: [--config=pyproject.toml]
- repo: https://github.com/mwouts/jupytext
rev: 8ed836db64ad5d304f2315e6bfd9049c9142e190 # frozen: v1.16.4
hooks:
- id: jupytext
files: docs/
args: [--sync]