Skip to content

Commit

Permalink
Add precommit config
Browse files Browse the repository at this point in the history
  • Loading branch information
bobleesj committed Sep 18, 2024
1 parent 4f588ba commit d60d61b
Showing 1 changed file with 43 additions and 17 deletions.
60 changes: 43 additions & 17 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,20 +1,46 @@
default_language_version:
python: python3
ci:
autofix_commit_msg: |
[pre-commit.ci] auto fixes from pre-commit hooks
autofix_prs: true
autoupdate_branch: 'pre-commit-autoupdate'
autoupdate_commit_msg: '[pre-commit.ci] pre-commit autoupdate'
autoupdate_schedule: monthly
skip: [no-commit-to-branch]
submodules: false
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.3.0
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: check-yaml
exclude: '.*\.cif$'
- id: end-of-file-fixer
exclude: '.*\.cif$'
- id: trailing-whitespace
exclude: '.*\.cif$'
- id: check-toml
exclude: '.*\.cif$'
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.5.0
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace
- id: check-case-conflict
- id: check-merge-conflict
- id: check-toml
- id: check-added-large-files
- repo: https://github.com/psf/black
rev: 24.4.2
hooks:
- id: ruff
args: [ --fix ]
exclude: '.*\.cif$'
- id: ruff-format
exclude: '.*\.cif$'
- id: black
- repo: https://github.com/pycqa/flake8
rev: 7.0.0
hooks:
- id: flake8
- repo: https://github.com/pycqa/isort
rev: 5.13.2
hooks:
- id: isort
args: ["--profile", "black"]
- repo: https://github.com/kynan/nbstripout
rev: 0.7.1
hooks:
- id: nbstripout
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: no-commit-to-branch
name: Prevent Commit to Main Branch
args: ["--branch", "main"]
stages: [pre-commit]

0 comments on commit d60d61b

Please sign in to comment.