From c1bc7f4dee1242b6acba5aa5864328ab2af9e04e Mon Sep 17 00:00:00 2001 From: Chris Krycho Date: Wed, 31 Jul 2024 10:40:03 -0600 Subject: [PATCH] Remove `ecosystem_ci` flag from Ruff CLI (#12596) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Summary @zanieb noticed while we were discussing #12595 that this flag is now unnecessary, so remove it and the flags which reference it. ## Test Plan Question for maintainers: is there a test to add *or* remove here? (I’ve opened this as a draft PR with that in view!) --- crates/ruff/src/args.rs | 5 ----- crates/ruff/src/lib.rs | 7 ------- python/ruff-ecosystem/ruff_ecosystem/projects.py | 2 +- scripts/check_ecosystem.py | 2 +- 4 files changed, 2 insertions(+), 14 deletions(-) diff --git a/crates/ruff/src/args.rs b/crates/ruff/src/args.rs index 74448b72a745a..3862c2a0d9cd5 100644 --- a/crates/ruff/src/args.rs +++ b/crates/ruff/src/args.rs @@ -400,9 +400,6 @@ pub struct CheckCommand { conflicts_with = "watch", )] pub show_settings: bool, - /// Dev-only argument to show fixes - #[arg(long, hide = true)] - pub ecosystem_ci: bool, } #[derive(Clone, Debug, clap::Parser)] @@ -662,7 +659,6 @@ impl CheckCommand { let check_arguments = CheckArguments { add_noqa: self.add_noqa, diff: self.diff, - ecosystem_ci: self.ecosystem_ci, exit_non_zero_on_fix: self.exit_non_zero_on_fix, exit_zero: self.exit_zero, files: self.files, @@ -946,7 +942,6 @@ fn resolve_output_format( pub struct CheckArguments { pub add_noqa: bool, pub diff: bool, - pub ecosystem_ci: bool, pub exit_non_zero_on_fix: bool, pub exit_zero: bool, pub files: Vec, diff --git a/crates/ruff/src/lib.rs b/crates/ruff/src/lib.rs index 60823478af974..8ba057cefc2bd 100644 --- a/crates/ruff/src/lib.rs +++ b/crates/ruff/src/lib.rs @@ -287,13 +287,6 @@ pub fn check(args: CheckCommand, global_options: GlobalConfigArgs) -> Result list[str]: if self.exclude: args.extend(["--exclude", self.exclude]) if self.show_fixes: - args.extend(["--show-fixes", "--ecosystem-ci"]) + args.extend(["--show-fixes"]) return args diff --git a/scripts/check_ecosystem.py b/scripts/check_ecosystem.py index 7e9502b0e956a..e9b38d3d4e136 100755 --- a/scripts/check_ecosystem.py +++ b/scripts/check_ecosystem.py @@ -191,7 +191,7 @@ async def check( if exclude: ruff_args.extend(["--exclude", exclude]) if show_fixes: - ruff_args.extend(["--show-fixes", "--ecosystem-ci"]) + ruff_args.extend(["--show-fixes"]) start = time.time() proc = await create_subprocess_exec(