From e64ea8dd7d0d9f14963a9460cd4869616bcdc764 Mon Sep 17 00:00:00 2001 From: cruldra Date: Mon, 31 Mar 2025 14:28:56 +0000 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20Python/.pre-commit-config.?= =?UTF-8?q?yaml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Python/.pre-commit-config.yaml | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/Python/.pre-commit-config.yaml b/Python/.pre-commit-config.yaml index cadf5ab..c35c3b8 100644 --- a/Python/.pre-commit-config.yaml +++ b/Python/.pre-commit-config.yaml @@ -1,4 +1,16 @@ 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 rev: v4.5.0 hooks: @@ -11,15 +23,9 @@ repos: - id: mixed-line-ending - 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 rev: 5.13.2 hooks: - id: isort name: isort (python) - args: ["--profile", "black"] + args: ["--profile", "black"] \ No newline at end of file