Add ruff-check hook to pre-commit config

跟随官方推荐
This commit is contained in:
LIghtJUNction
2025-10-21 11:07:00 +08:00
committed by GitHub
parent fdb5988cec
commit 745e1c37c0
+11 -5
View File
@@ -6,8 +6,14 @@ ci:
autoupdate_schedule: weekly
autoupdate_commit_msg: ":balloon: pre-commit autoupdate"
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.14.1
hooks:
- id: ruff
- id: ruff-format
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.14.1
hooks:
# Run the linter.
- id: ruff-check
types_or: [ python, pyi ]
args: [ --fix ]
# Run the formatter.
- id: ruff-format
types_or: [ python, pyi ]