default_install_hook_types: - pre-commit - commit-msg default_stages: - pre-commit # Run locally # - manual # Run in CI repos: # 代码检查 - repo: https://github.com/astral-sh/ruff-pre-commit rev: v0.11.7 hooks: - id: ruff args: [--output-format, github, --fix, --line-length=120] # # 拼写检查 # - repo: https://github.com/codespell-project/codespell # rev: v2.4.1 # hooks: # - id: codespell # additional_dependencies: ['tomli'] # args: ['--toml', 'pyproject.toml'] # 自动排序 - repo: https://github.com/PyCQA/isort rev: 6.0.1 hooks: - id: isort # markdown - repo: https://github.com/jackdewinter/pymarkdown rev: v0.9.29 hooks: - id: pymarkdown args: [fix] - repo: https://github.com/pre-commit/pre-commit-hooks rev: v5.0.0 hooks: - id: check-merge-conflict - id: check-symlinks - id: end-of-file-fixer - id: trailing-whitespace - id: detect-private-key - id: check-symlinks - id: check-added-large-files