From daeae1cbce4a52d8a3834b74db09697c6ad7e6ca Mon Sep 17 00:00:00 2001 From: luke <2736230899@qq.com> Date: Sat, 11 Mar 2023 08:55:29 +0800 Subject: [PATCH 1/3] CI/STYLE: Add auto-fix to ruff --- pyproject.toml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index c5c9cd702a380..db29a699b0c8b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -197,6 +197,8 @@ exclude = ''' line-length = 88 update-check = false target-version = "py38" +fix-only = true +unfixable = ["E721"] select = [ # pyflakes From 4319a3d14aa3dafcf0c374c212395a1deb435c1a Mon Sep 17 00:00:00 2001 From: luke <2736230899@qq.com> Date: Sun, 12 Mar 2023 08:53:10 +0800 Subject: [PATCH 2/3] add --exit-non-zero-on-fix --- .pre-commit-config.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index f10cfac5f1276..98dc671a8b35f 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -31,6 +31,7 @@ repos: rev: v0.0.253 hooks: - id: ruff + args: [--exit-non-zero-on-fix] - repo: https://github.com/jendrikseipp/vulture rev: 'v2.7' hooks: From 71c2d024529eeb507c5d615b926f15f8993adbc2 Mon Sep 17 00:00:00 2001 From: Marco Edward Gorelli <33491632+MarcoGorelli@users.noreply.github.com> Date: Sun, 12 Mar 2023 08:38:00 +0000 Subject: [PATCH 3/3] use fix, not fix-only --- pyproject.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index e28b565e874f3..16143706196ef 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -197,8 +197,8 @@ exclude = ''' line-length = 88 update-check = false target-version = "py38" -fix-only = true -unfixable = ["E721"] +fix = true +unfixable = ["E711"] select = [ # pyflakes