refactor: 重构代码风格与配置,完善文档与CI
1. 移除冗余导入与简化代码写法 2. 更新coverage配置与pre-commit钩子 3. 重构CI流程,拆分lint/typecheck/test任务 4. 汉化项目文档与注释 5. 修正graphlib导入的类型忽略注释
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
# prek compatible configuration
|
||||
# See https://pre-commit.com for more information
|
||||
repos:
|
||||
- repo: https://gitcode.com/gh_mirrors/ru/ruff-pre-commit.git
|
||||
# Ruff version - keep in sync with pyproject.toml
|
||||
rev: v0.15.4
|
||||
hooks:
|
||||
# Run the linter
|
||||
- id: ruff
|
||||
args: [ --fix, --exit-non-zero-on-fix ]
|
||||
# Run the formatter
|
||||
- id: ruff-format
|
||||
args: [ --config=pyproject.toml]
|
||||
- repo: https://gitcode.com/gh_mirrors/pr/pre-commit-hooks.git
|
||||
rev: v5.0.0
|
||||
hooks:
|
||||
- id: check-merge-conflict
|
||||
- id: debug-statements
|
||||
- id: fix-byte-order-marker
|
||||
- id: trailing-whitespace
|
||||
args: [ --markdown-linebreak-ext=md ]
|
||||
- id: end-of-file-fixer
|
||||
Reference in New Issue
Block a user