diff options
| author | binarycat <binarycat@envs.net> | 2025-09-08 08:24:56 -0500 |
|---|---|---|
| committer | binarycat <binarycat@envs.net> | 2025-09-08 08:24:56 -0500 |
| commit | a9d884df81a1af5983eb01a94429ffc4b2803a08 (patch) | |
| tree | 1b97b13e2e45a5638505eddaa2ab5fc8f441fb20 | |
| parent | 469a80ec725556ec1be482983b0321a10eeb61f4 (diff) | |
| download | rust-a9d884df81a1af5983eb01a94429ffc4b2803a08.tar.gz rust-a9d884df81a1af5983eb01a94429ffc4b2803a08.zip | |
tidy: py:lint extra check now works with --bless
| -rw-r--r-- | src/tools/tidy/src/extra_checks/mod.rs | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/tools/tidy/src/extra_checks/mod.rs b/src/tools/tidy/src/extra_checks/mod.rs index 83e94b78c71..5e7a686e775 100644 --- a/src/tools/tidy/src/extra_checks/mod.rs +++ b/src/tools/tidy/src/extra_checks/mod.rs @@ -147,9 +147,16 @@ fn check_impl( } if python_lint { - eprintln!("linting python files"); let py_path = py_path.as_ref().unwrap(); - let res = run_ruff(root_path, outdir, py_path, &cfg_args, &file_args, &["check".as_ref()]); + let args: &[&OsStr] = if bless { + eprintln!("linting python files and applying suggestions"); + &["check".as_ref(), "--fix".as_ref()] + } else { + eprintln!("linting python files"); + &["check".as_ref()] + }; + + let res = run_ruff(root_path, outdir, py_path, &cfg_args, &file_args, args); if res.is_err() && show_diff { eprintln!("\npython linting failed! Printing diff suggestions:"); |
