mirror of
https://github.com/astral-sh/ruff.git
synced 2025-09-29 13:24:57 +00:00
add show_fix_status and fix_applicability getters on config
since these names were already taken, I moved the setters to `with_*` this allows fetching the values when setting up the GroupedEmitter even though it doesn't use the rest of the rendering infrastructure
This commit is contained in:
parent
2ea823e999
commit
6eeaffd324
4 changed files with 22 additions and 14 deletions
|
@ -449,9 +449,9 @@ pub(crate) fn print_jupyter_messages(
|
|||
let config = DisplayDiagnosticConfig::default()
|
||||
.format(DiagnosticFormat::Full)
|
||||
.hide_severity(true)
|
||||
.show_fix_status(true)
|
||||
.with_show_fix_status(true)
|
||||
.show_fix_diff(true)
|
||||
.fix_applicability(Applicability::DisplayOnly);
|
||||
.with_fix_applicability(Applicability::DisplayOnly);
|
||||
|
||||
DisplayDiagnostics::new(
|
||||
&EmitterContext::new(&FxHashMap::from_iter([(
|
||||
|
@ -468,9 +468,9 @@ pub(crate) fn print_messages(diagnostics: &[Diagnostic]) -> String {
|
|||
let config = DisplayDiagnosticConfig::default()
|
||||
.format(DiagnosticFormat::Full)
|
||||
.hide_severity(true)
|
||||
.show_fix_status(true)
|
||||
.with_show_fix_status(true)
|
||||
.show_fix_diff(true)
|
||||
.fix_applicability(Applicability::DisplayOnly);
|
||||
.with_fix_applicability(Applicability::DisplayOnly);
|
||||
|
||||
DisplayDiagnostics::new(
|
||||
&EmitterContext::new(&FxHashMap::default()),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue