Add reference pre-commit config

This commit is contained in:
Lengyue
2023-09-05 01:08:42 -04:00
parent 24ba0f26df
commit 55404f92b5
2 changed files with 29 additions and 0 deletions

4
.gitignore vendored
View File

@@ -162,3 +162,7 @@ cython_debug/
.DS_Store
/models
/logs
filelists/*
!/filelists/esd.list
data/*

25
.pre-commit-config.yaml Normal file
View File

@@ -0,0 +1,25 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.3.0
hooks:
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.0.280
hooks:
- id: ruff
args: [ --fix ]
- repo: https://github.com/psf/black
rev: 22.12.0
hooks:
- id: black
- repo: https://github.com/codespell-project/codespell
rev: v2.2.4
hooks:
- id: codespell
files: ^.*\.(py|md|rst|yml)$
args: [-L=fro]