mirror of
https://github.com/astral-sh/ruff.git
synced 2025-09-28 21:05:08 +00:00
Remove output-file and target-version from formatter CLI (#7135)
This commit is contained in:
parent
0465b03282
commit
10a8e4a225
2 changed files with 4 additions and 20 deletions
|
@ -1,7 +1,5 @@
|
|||
use std::fmt::{Display, Formatter};
|
||||
use std::fs::File;
|
||||
use std::io;
|
||||
use std::io::{BufWriter, Write};
|
||||
use std::num::NonZeroU16;
|
||||
use std::path::{Path, PathBuf};
|
||||
use std::time::Instant;
|
||||
|
@ -106,15 +104,10 @@ pub(crate) fn format(
|
|||
|
||||
// Report on the formatting changes.
|
||||
if log_level >= LogLevel::Default {
|
||||
let mut writer: Box<dyn Write> = match &cli.output_file {
|
||||
Some(path) => {
|
||||
colored::control::set_override(false);
|
||||
let file = File::create(path)?;
|
||||
Box::new(BufWriter::new(file))
|
||||
}
|
||||
_ => Box::new(BufWriter::new(io::stdout())),
|
||||
};
|
||||
writeln!(writer, "{summary}")?;
|
||||
#[allow(clippy::print_stdout)]
|
||||
{
|
||||
println!("{summary}");
|
||||
}
|
||||
}
|
||||
|
||||
match mode {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue