From 84a1a2c7d15d815d99019d209be344c3f6759103 Mon Sep 17 00:00:00 2001 From: Jane Lewis Date: Thu, 11 Jan 2024 14:17:42 -0800 Subject: [PATCH] Remove extraneous newline from stdout for `--show-settings` --- crates/ruff_cli/src/commands/show_settings.rs | 2 +- .../snapshots/show_settings__display_default_settings.snap | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/crates/ruff_cli/src/commands/show_settings.rs b/crates/ruff_cli/src/commands/show_settings.rs index 95adb20c0089c..a23f31a4967a2 100644 --- a/crates/ruff_cli/src/commands/show_settings.rs +++ b/crates/ruff_cli/src/commands/show_settings.rs @@ -35,7 +35,7 @@ pub(crate) fn show_settings( if let Some(settings_path) = pyproject_config.path.as_ref() { writeln!(writer, "Settings path: {settings_path:?}")?; } - writeln!(writer, "{settings}")?; + write!(writer, "{settings}")?; Ok(()) } diff --git a/crates/ruff_cli/tests/snapshots/show_settings__display_default_settings.snap b/crates/ruff_cli/tests/snapshots/show_settings__display_default_settings.snap index a88eb4e2edde7..1dc3b39553881 100644 --- a/crates/ruff_cli/tests/snapshots/show_settings__display_default_settings.snap +++ b/crates/ruff_cli/tests/snapshots/show_settings__display_default_settings.snap @@ -357,6 +357,5 @@ formatter.magic_trailing_comma = respect formatter.docstring_code_format = disabled formatter.docstring_code_line_width = dynamic - ----- stderr -----