repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.16.6
hooks:
- id: ruff-check
name: ruff lint mne
args: ["--fix"]
files: ^mne/|^tools/
exclude: vulture_allowlist.py
- id: ruff-check
name: ruff lint mne preview
args: ["--fix", "--preview", "--select=NPY201"]
files: ^mne/|^tools/
- id: ruff-check
name: ruff lint doc, tutorials, and examples
args: ["--ignore=D103,D400", "--fix"]
files: ^doc/|^tutorials/|^examples/
- id: ruff-format
files: ^mne/|^doc/|^tutorials/|^examples/|^tools/
- repo: https://github.com/astral-sh/ty-pre-commit
rev: v0.0.79
hooks:
- id: ty
additional_dependencies:
- antio
- curryreader
- edfio
- eeglabio
- h5py
- lazy_loader
- matplotlib
- mffpy
- neo
- numpy
- pandas
- pymatreader
- pymef
- quantities
- scipy
args: [--no-python-downloads, --no-project]
- repo: https://github.com/codespell-project/codespell
rev: v2.4.3
hooks:
- id: codespell
additional_dependencies:
- tomli
files: ^mne/|^doc/|^examples/|^tutorials/|^tools/
types_or: [python, bib, rst, inc]
- repo: https://github.com/adrienverge/yamllint.git
rev: v1.38.0
hooks:
- id: yamllint
args: [--strict, -c, .yamllint.yml]
- repo: https://github.com/rstcheck/rstcheck.git
rev: v6.3.0
hooks:
- id: rstcheck
additional_dependencies:
- tomli
files: ^doc/.*\.(rst|inc)$
exclude: ^doc/credits/(credit|sponsors).rst$
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
- id: file-contents-sorter
files: ^ignore_words.txt
args: ["--ignore-case"]
- repo: https://github.com/pappasam/toml-sort
rev: v0.24.4
hooks:
- id: toml-sort-fix
files: pyproject.toml
- repo: local
hooks:
- id: sort-contributor-names
name: Sort contributor names ignoring case and accents
language: python
entry: ./tools/hooks/sort_contributor_names.py
files: '^(doc/changes/names.inc|.mailmap)$'
- repo: https://github.com/woodruffw/zizmor-pre-commit
rev: v1.30.1
hooks:
- id: zizmor
args: [--fix]
exclude: ^.github/workflows/automerge.yml