更新 pre-commit 工作流,移除虚拟环境依赖并直接使用系统 Python 执行 pre-commit

This commit is contained in:
远野千束(神羽) 2024-12-13 03:00:42 +08:00
parent 9e6cf7ecd7
commit 20eeb5724f

View File

@ -18,8 +18,9 @@ jobs:
- name: Install dependencies - name: Install dependencies
run: | run: |
python -m pip install pdm python -m pip install pdm
pdm config python.use_venv false
pdm install --no-lock pdm install --no-lock
.venv/bin/python -m pre-commit install pre-commit install
- name: Run pre-commit - name: Run pre-commit
run: .venv/bin/python -m pre-commit run --all-files run: pre-commit run --all-files