更新 Python/.pre-commit-config.yaml

This commit is contained in:
2025-03-31 14:28:56 +00:00
parent adbc3f8398
commit e64ea8dd7d

View File

@@ -1,4 +1,16 @@
repos: repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.11.2
hooks:
# Run the linter.
- id: ruff
types_or: [ python, pyi ]
args: [ --fix ]
# Run the formatter.
- id: ruff-format
types_or: [ python, pyi ]
- repo: https://github.com/pre-commit/pre-commit-hooks - repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0 rev: v4.5.0
hooks: hooks:
@@ -11,12 +23,6 @@ repos:
- id: mixed-line-ending - id: mixed-line-ending
- id: debug-statements - id: debug-statements
- repo: https://github.com/psf/black
rev: 24.3.0
hooks:
- id: black
language_version: python3.12
- repo: https://github.com/pycqa/isort - repo: https://github.com/pycqa/isort
rev: 5.13.2 rev: 5.13.2
hooks: hooks: