2021-02-10 06:39:35 -08:00
|
|
|
# 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:
|
2023-03-23 21:17:54 +00:00
|
|
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
2024-08-27 15:23:13 -07:00
|
|
|
rev: 2c9f875913ee60ca25ce70243dc24d5b6415598c # frozen: v4.6.0
|
2023-03-23 21:17:54 +00:00
|
|
|
hooks:
|
2023-11-29 16:33:55 -08:00
|
|
|
- id: check-ast
|
|
|
|
- id: check-merge-conflict
|
|
|
|
- id: check-toml
|
|
|
|
- id: check-yaml
|
2023-03-30 13:29:50 -07:00
|
|
|
- id: end-of-file-fixer
|
|
|
|
# only include python files
|
|
|
|
files: \.py$
|
|
|
|
- id: debug-statements
|
|
|
|
# only include python files
|
|
|
|
files: \.py$
|
2023-03-23 21:17:54 +00:00
|
|
|
- id: trailing-whitespace
|
|
|
|
# only include python files
|
|
|
|
files: \.py$
|
|
|
|
|
2023-11-14 23:34:30 -05:00
|
|
|
- repo: https://github.com/astral-sh/ruff-pre-commit
|
2024-10-21 13:17:16 +01:00
|
|
|
rev: 8983acb92ee4b01924893632cf90af926fa608f0 # frozen: v0.7.0
|
2021-02-10 13:44:40 -08:00
|
|
|
hooks:
|
2023-11-14 23:34:30 -05:00
|
|
|
- id: ruff
|
2021-02-10 13:44:40 -08:00
|
|
|
|
|
|
|
- repo: https://github.com/pre-commit/mirrors-mypy
|
2025-02-12 13:27:29 +00:00
|
|
|
rev: 'bbc3dc1f890007061f18f17e2334f216ea9e5df7' # frozen: v1.14.1
|
2021-02-10 13:44:40 -08:00
|
|
|
hooks:
|
|
|
|
- id: mypy
|
2022-09-13 12:43:51 -07:00
|
|
|
files: (jax/|tests/typing_test\.py)
|
2023-08-22 11:50:09 -07:00
|
|
|
exclude: jax/_src/basearray.py|jax/numpy/__init__.py # Use pyi instead
|
2024-12-10 13:38:51 -08:00
|
|
|
additional_dependencies: [types-requests==2.31.0, jaxlib, numpy>=2.2.0]
|
2023-04-15 02:39:39 +01:00
|
|
|
args: [--config=pyproject.toml]
|
2021-02-10 13:44:40 -08:00
|
|
|
|
|
|
|
- repo: https://github.com/mwouts/jupytext
|
2024-08-27 15:23:13 -07:00
|
|
|
rev: 8ed836db64ad5d304f2315e6bfd9049c9142e190 # frozen: v1.16.4
|
2021-02-10 13:44:40 -08:00
|
|
|
hooks:
|
|
|
|
- id: jupytext
|
2024-07-18 11:27:31 -04:00
|
|
|
files: docs/
|
2021-02-10 13:44:40 -08:00
|
|
|
args: [--sync]
|