From 9a3c8c7dff3662f8a869f9b24776951962712df7 Mon Sep 17 00:00:00 2001 From: Justin Chu Date: Thu, 27 Jun 2024 15:43:53 -0700 Subject: [PATCH] fix(linter): Use `check` in ruff (#101) Compatibility with ruff 0.5 --- lintrunner_adapters/adapters/ruff_fix_linter.py | 1 + lintrunner_adapters/adapters/ruff_linter.py | 2 ++ 2 files changed, 3 insertions(+) diff --git a/lintrunner_adapters/adapters/ruff_fix_linter.py b/lintrunner_adapters/adapters/ruff_fix_linter.py index 4f0ef0f..0918b8e 100644 --- a/lintrunner_adapters/adapters/ruff_fix_linter.py +++ b/lintrunner_adapters/adapters/ruff_fix_linter.py @@ -36,6 +36,7 @@ def check_file( sys.executable, "-m", "ruff", + "check", "--fix-only", "--exit-zero", *([f"--config={config}"] if config else []), diff --git a/lintrunner_adapters/adapters/ruff_linter.py b/lintrunner_adapters/adapters/ruff_linter.py index 2c7ec50..461a728 100644 --- a/lintrunner_adapters/adapters/ruff_linter.py +++ b/lintrunner_adapters/adapters/ruff_linter.py @@ -103,6 +103,7 @@ def check_files( sys.executable, "-m", "ruff", + "check", "--exit-zero", "--quiet", "--output-format=json", @@ -186,6 +187,7 @@ def check_file_for_fixes( sys.executable, "-m", "ruff", + "check", "--fix-only", "--exit-zero", *([f"--config={config}"] if config else []),