1
0
forked from bot/app

添加 pre-commit 配置和工作流,集成代码格式化和静态检查工具

This commit is contained in:
2024-12-13 19:35:07 +08:00
parent 93c17b6026
commit cc1bb8e5e4
5 changed files with 147 additions and 33 deletions

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

@ -0,0 +1,26 @@
fail_fast: true
repos:
- repo: https://github.com/psf/black
rev: 24.4.2
hooks:
- id: black
args: [--config=./pyproject.toml]
- repo: https://github.com/timothycrosley/isort
rev: 5.13.2
hooks:
- id: isort
args: ["--profile", "black"]
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.13.0
hooks:
- id: mypy
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.0.1
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-added-large-files