rocm_jax/.pre-commit-config.yaml
2024-10-21 21:58:41 +01:00

48 lines
1.3 KiB
YAML

# 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: 2c9f875913ee60ca25ce70243dc24d5b6415598c # frozen: v4.6.0
hooks:
- id: check-ast
- id: check-merge-conflict
- id: check-toml
- id: check-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: 8983acb92ee4b01924893632cf90af926fa608f0 # frozen: v0.7.0
hooks:
- id: ruff
- repo: https://github.com/pre-commit/mirrors-mypy
rev: '102bbee94061ff02fd361ec29c27b7cb26582f5f' # frozen: v1.12.2
hooks:
- id: mypy
files: (jax/|tests/typing_test\.py)
exclude: jax/_src/basearray.py|jax/numpy/__init__.py # Use pyi instead
additional_dependencies: [types-requests==2.31.0, jaxlib]
args: [--config=pyproject.toml]
- repo: https://github.com/mwouts/jupytext
rev: 8ed836db64ad5d304f2315e6bfd9049c9142e190 # frozen: v1.16.4
hooks:
- id: jupytext
files: docs/
args: [--sync]