Less scary ruff format message (#7867)

This commit is contained in:
konsti 2023-10-11 13:46:41 +02:00 committed by GitHub
parent 0f759af3cf
commit ec9d5cddd6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 10 deletions

View file

@ -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<ExitStatus> {
{
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<ExitStatus> {
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();