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-04-08 00:59:02 +05:30
|
|
|
rev: 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-05-16 15:10:01 +01:00
|
|
|
rev: v0.4.4
|
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
|
2024-05-16 15:10:01 +01:00
|
|
|
rev: 'v1.10.0'
|
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-05-16 15:10:01 +01:00
|
|
|
additional_dependencies: [types-requests==2.31.0, jaxlib==0.4.27, ml_dtypes==0.3.2, numpy==1.26.3, scipy==1.11.4]
|
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-04-08 00:59:02 +05:30
|
|
|
rev: v1.16.1
|
2021-02-10 13:44:40 -08:00
|
|
|
hooks:
|
|
|
|
- id: jupytext
|
|
|
|
args: [--sync]
|