diff --git a/crates/ruff_cli/src/lib.rs b/crates/ruff_cli/src/lib.rs index 800a16da77546..d51aac5d52b20 100644 --- a/crates/ruff_cli/src/lib.rs +++ b/crates/ruff_cli/src/lib.rs @@ -6,6 +6,7 @@ use std::sync::mpsc::channel; use anyhow::Result; use clap::CommandFactory; +use colored::Colorize; use log::warn; use notify::{recommended_watcher, RecursiveMode, Watcher}; @@ -104,8 +105,6 @@ pub fn run( }: Args, ) -> Result { { - use colored::Colorize; - let default_panic_hook = std::panic::take_hook(); std::panic::set_hook(Box::new(move |info| { #[allow(clippy::print_stderr)] @@ -166,10 +165,7 @@ pub fn run( } fn format(args: FormatCommand, log_level: LogLevel) -> Result { - warn_user_once!( - "`ruff format` is a work-in-progress, subject to change at any time, and intended only for \ - experimentation." - ); + warn_user_once!("`ruff format` is not yet stable, and subject to change in future versions."); let (cli, overrides) = args.partition(); diff --git a/crates/ruff_cli/tests/format.rs b/crates/ruff_cli/tests/format.rs index 92ccf123f8201..8f90feb6148be 100644 --- a/crates/ruff_cli/tests/format.rs +++ b/crates/ruff_cli/tests/format.rs @@ -39,7 +39,7 @@ if condition: print('Hy "Micha"') # Should not change quotes ----- stderr ----- - warning: `ruff format` is a work-in-progress, subject to change at any time, and intended only for experimentation. + warning: `ruff format` is not yet stable, and subject to change in future versions. "###); } @@ -83,7 +83,7 @@ if condition: print('Should change quotes') ----- stderr ----- - warning: `ruff format` is a work-in-progress, subject to change at any time, and intended only for experimentation. + warning: `ruff format` is not yet stable, and subject to change in future versions. "###); Ok(()) } @@ -139,7 +139,7 @@ if condition: print('Should change quotes') ----- stderr ----- - warning: `ruff format` is a work-in-progress, subject to change at any time, and intended only for experimentation. + warning: `ruff format` is not yet stable, and subject to change in future versions. "###); Ok(()) } diff --git a/crates/ruff_cli/tests/integration_test.rs b/crates/ruff_cli/tests/integration_test.rs index 7937af211cab3..094b2f5cc4e6e 100644 --- a/crates/ruff_cli/tests/integration_test.rs +++ b/crates/ruff_cli/tests/integration_test.rs @@ -486,7 +486,7 @@ fn stdin_format_jupyter() { } ----- stderr ----- - warning: `ruff format` is a work-in-progress, subject to change at any time, and intended only for experimentation. + warning: `ruff format` is not yet stable, and subject to change in future versions. "###); }