Develop: 完全使用 ruff 替代 isort 与 black (#1757)

* 🚨 完全使用 ruff 替代 isort 与 black

* 🚨 ruff lint&format
This commit is contained in:
BalconyJH
2024-12-10 19:49:11 +08:00
committed by GitHub
parent 28dd15a950
commit bc5a9c4fcc
147 changed files with 823 additions and 863 deletions
+8 -25
View File
@@ -1,33 +1,16 @@
default_install_hook_types: [pre-commit, prepare-commit-msg]
default_install_hook_types: [pre-commit]
ci:
autofix_commit_msg: ":rotating_light: auto fix by pre-commit hooks"
autofix_prs: true
autoupdate_branch: dev
autoupdate_schedule: weekly
autoupdate_branch: master
autoupdate_schedule: monthly
autoupdate_commit_msg: ":arrow_up: auto update by pre-commit hooks"
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.5.6
rev: v0.8.1
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
stages: [commit]
- repo: https://github.com/pycqa/isort
rev: 5.13.2
hooks:
- id: isort
stages: [commit]
- repo: https://github.com/psf/black
rev: 24.8.0
hooks:
- id: black
stages: [commit]
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v4.0.0-alpha.8
hooks:
- id: prettier
types_or: [javascript, jsx, ts, tsx, markdown, yaml, json]
stages: [commit]
args: [--fix]
stages: [pre-commit]
- id: ruff-format
stages: [pre-commit]