diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 7d0d57ac4..f0c0e895a 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -8,7 +8,7 @@ ci: repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.5.0 + rev: v6.0.0 hooks: - id: check-yaml - id: check-case-conflict @@ -18,19 +18,19 @@ repos: - id: requirements-txt-fixer - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.14.7 + rev: v0.14.10 hooks: - id: ruff-check args: [ --fix ] - repo: https://github.com/PyCQA/autoflake - rev: v2.0.2 + rev: v2.3.1 hooks: - id: autoflake args: [--remove-all-unused-imports, --in-place] - repo: https://github.com/pycqa/isort - rev: 5.13.2 # 选一个稳定版本 + rev: 7.0.0 # 选一个稳定版本 hooks: - id: isort args: @@ -39,7 +39,7 @@ repos: additional_dependencies: [] # 需要插件时在这里加 - repo: https://github.com/psf/black - rev: 24.3.0 + rev: 25.12.0 hooks: - id: black name: Format code diff --git a/pyproject.toml b/pyproject.toml index 6f9ee242a..28cf1de9d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -24,6 +24,8 @@ line_length = 119 [tool.ruff] line-length = 320 # TODO + +[tool.ruff.lint] select = [ "E", # Pycodestyle Errors (Structural/Fundamental Errors like bad indentation) "F", # Pyflakes (Core Errors: Unused imports, undefined names)