# 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/mirrors-clang-format
  rev: 'v15.0.7'
  hooks:
  - id: clang-format
    # Automatic formatting only on IPU files.
    files: .*/ipu

- repo: https://github.com/google/yapf
  rev: v0.32.0
  hooks:
  - id: yapf
    additional_dependencies: [toml]
    # Automatic formatting only on IPU files.
    files: .*/ipu

- repo: https://github.com/pycqa/flake8
  rev: '4.0.1'
  hooks:
  - id: flake8

- repo: https://github.com/pre-commit/mirrors-mypy
  rev: 'v0.942'
  hooks:
  - id: mypy
    files: jax/
    additional_dependencies: [types-requests==2.27.16, jaxlib==0.3.5]

- repo: https://github.com/mwouts/jupytext
  rev: v1.13.8
  hooks:
  - id: jupytext
    args: [--sync]
