init
This commit is contained in:
28
.pre-commit-config.yaml
Normal file
28
.pre-commit-config.yaml
Normal file
@@ -0,0 +1,28 @@
|
||||
repos:
|
||||
- repo: local
|
||||
# fail_fast: false
|
||||
hooks:
|
||||
# 执行ruff check并修复
|
||||
- id: ruff-check
|
||||
name: Ruff Check
|
||||
# entry: cmd /c "uv run ruff check --preview --fix --unsafe-fixes || exit /b 0"
|
||||
entry: uv run ruff check --preview --fix --unsafe-fixes
|
||||
language: system
|
||||
types: [python]
|
||||
pass_filenames: false
|
||||
|
||||
# 执行ruff格式化
|
||||
- id: ruff-format
|
||||
name: Ruff Format
|
||||
entry: uv run ruff format
|
||||
language: system
|
||||
types: [python]
|
||||
pass_filenames: false
|
||||
|
||||
# 最后执行uv sync
|
||||
- id: uv-sync
|
||||
name: UV Sync
|
||||
entry: uv sync
|
||||
language: system
|
||||
types: [python]
|
||||
pass_filenames: false
|
||||
Reference in New Issue
Block a user