mirror of
https://github.com/astral-sh/ruff.git
synced 2025-10-01 22:31:47 +00:00
Refactor SourceKind
to store file content (#6640)
This commit is contained in:
parent
2aeb27334d
commit
ea72d5feba
17 changed files with 206 additions and 179 deletions
|
@ -177,7 +177,7 @@ impl Printer {
|
|||
return Ok(());
|
||||
}
|
||||
|
||||
let context = EmitterContext::new(&diagnostics.source_kind);
|
||||
let context = EmitterContext::new(&diagnostics.notebooks);
|
||||
|
||||
match self.format {
|
||||
SerializationFormat::Json => {
|
||||
|
@ -364,7 +364,7 @@ impl Printer {
|
|||
writeln!(writer)?;
|
||||
}
|
||||
|
||||
let context = EmitterContext::new(&diagnostics.source_kind);
|
||||
let context = EmitterContext::new(&diagnostics.notebooks);
|
||||
TextEmitter::default()
|
||||
.with_show_fix_status(show_fix_status(self.autofix_level))
|
||||
.with_show_source(self.flags.intersects(Flags::SHOW_SOURCE))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue