Skip to content

Commit

Permalink
Add precommit.
Browse files Browse the repository at this point in the history
  • Loading branch information
Shyue Ping Ong committed Jul 25, 2023
1 parent d71f1b5 commit 93f9f81
Showing 1 changed file with 47 additions and 0 deletions.
47 changes: 47 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
exclude: ^(docs|.*test_files|cmd_line|tasks.py)

ci:
autoupdate_schedule: monthly
skip: [mypy]
autofix_commit_msg: pre-commit auto-fixes
autoupdate_commit_msg: pre-commit autoupdate

repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.0.278
hooks:
- id: ruff
args: [--fix]

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: check-yaml
exclude: pymatgen/analysis/vesta_cutoffs.yaml
- id: end-of-file-fixer
- id: trailing-whitespace

- repo: https://github.com/psf/black
rev: 23.7.0
hooks:
- id: black

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.4.1
hooks:
- id: mypy

- repo: https://github.com/codespell-project/codespell
rev: v2.2.5
hooks:
- id: codespell
stages: [commit, commit-msg]
exclude_types: [html]
additional_dependencies: [tomli] # needed to read pyproject.toml below py3.11

- repo: https://github.com/MarcoGorelli/cython-lint
rev: v0.15.0
hooks:
- id: cython-lint
args: [--no-pycodestyle]
- id: double-quote-cython-strings

0 comments on commit 93f9f81

Please sign in to comment.