From 55404f92b5d3f949ea6dcf322b19412275e0b600 Mon Sep 17 00:00:00 2001 From: Lengyue Date: Tue, 5 Sep 2023 01:08:42 -0400 Subject: [PATCH] Add reference pre-commit config --- .gitignore | 4 ++++ .pre-commit-config.yaml | 25 +++++++++++++++++++++++++ 2 files changed, 29 insertions(+) create mode 100644 .pre-commit-config.yaml diff --git a/.gitignore b/.gitignore index a7ecc18..c4b7cbd 100644 --- a/.gitignore +++ b/.gitignore @@ -162,3 +162,7 @@ cython_debug/ .DS_Store /models /logs + +filelists/* +!/filelists/esd.list +data/* diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..090e114 --- /dev/null +++ b/.pre-commit-config.yaml @@ -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]