From ca8b12eb5459a98d5c93728bab4ac9d480731d60 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Ber=C3=A1nek?= Date: Tue, 31 Dec 2024 15:38:43 +0100 Subject: [PATCH] Print how to rebless Python formatting in tidy --- src/tools/tidy/src/ext_tool_checks.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/tools/tidy/src/ext_tool_checks.rs b/src/tools/tidy/src/ext_tool_checks.rs index 9792650d37d30..e8370a0af027b 100644 --- a/src/tools/tidy/src/ext_tool_checks.rs +++ b/src/tools/tidy/src/ext_tool_checks.rs @@ -154,6 +154,9 @@ fn check_impl( args.insert(0, "--diff".as_ref()); let _ = py_runner(py_path.as_ref().unwrap(), true, None, "ruff", &args); } + if res.is_err() && !bless { + eprintln!("rerun tidy with `--extra-checks=py:fmt --bless` to reformat Python code"); + } // Rethrow error let _ = res?; }