|
| 1 | +exclude: ^(docs|tests/files|tasks.py) |
| 2 | + |
| 3 | +ci: |
| 4 | + autoupdate_schedule: monthly |
| 5 | + skip: [mypy, pyright] |
| 6 | + autofix_commit_msg: pre-commit auto-fixes |
| 7 | + autoupdate_commit_msg: pre-commit autoupdate |
| 8 | + |
| 9 | +repos: |
| 10 | + - repo: https://github.com/astral-sh/ruff-pre-commit |
| 11 | + rev: v0.14.14 |
| 12 | + hooks: |
| 13 | + - id: ruff |
| 14 | + args: [--fix, --unsafe-fixes] |
| 15 | + - id: ruff-format |
| 16 | + |
| 17 | + - repo: https://github.com/pre-commit/pre-commit-hooks |
| 18 | + rev: v6.0.0 |
| 19 | + hooks: |
| 20 | + - id: check-yaml |
| 21 | + - id: end-of-file-fixer |
| 22 | + - id: trailing-whitespace |
| 23 | + |
| 24 | + - repo: https://github.com/pre-commit/mirrors-mypy |
| 25 | + rev: v1.19.1 |
| 26 | + hooks: |
| 27 | + - id: mypy |
| 28 | + entry: mypy -p pymatgen |
| 29 | + pass_filenames: false |
| 30 | + |
| 31 | + - repo: https://github.com/codespell-project/codespell |
| 32 | + rev: v2.4.1 |
| 33 | + hooks: |
| 34 | + - id: codespell |
| 35 | + stages: [pre-commit, commit-msg] |
| 36 | + exclude_types: [html] |
| 37 | + additional_dependencies: [tomli] # needed to read pyproject.toml below py3.11 |
| 38 | + exclude: src/pymatgen/analysis/aflow_prototypes.json |
| 39 | + |
| 40 | + - repo: https://github.com/MarcoGorelli/cython-lint |
| 41 | + rev: v0.19.0 |
| 42 | + hooks: |
| 43 | + - id: cython-lint |
| 44 | + args: [--no-pycodestyle] |
| 45 | + - id: double-quote-cython-strings |
| 46 | + |
| 47 | + - repo: https://github.com/adamchainz/blacken-docs |
| 48 | + rev: 1.20.0 |
| 49 | + hooks: |
| 50 | + - id: blacken-docs |
| 51 | + |
| 52 | + - repo: https://github.com/igorshubovych/markdownlint-cli |
| 53 | + rev: v0.47.0 |
| 54 | + hooks: |
| 55 | + - id: markdownlint |
| 56 | + # MD013: line too long |
| 57 | + # MD024: Multiple headings with the same content |
| 58 | + # MD033: no inline HTML |
| 59 | + # MD041: first line in a file should be a top-level heading |
| 60 | + # MD025: single title |
| 61 | + args: [--disable, MD013, MD024, MD025, MD033, MD041, "--"] |
| 62 | + |
| 63 | + - repo: https://github.com/kynan/nbstripout |
| 64 | + rev: 0.9.0 |
| 65 | + hooks: |
| 66 | + - id: nbstripout |
| 67 | + args: [--drop-empty-cells, --keep-output] |
| 68 | + |
| 69 | + - repo: https://github.com/RobertCraigie/pyright-python |
| 70 | + rev: v1.1.408 |
| 71 | + hooks: |
| 72 | + - id: pyright |
0 commit comments