Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
InSyncWithFoo committed Jan 5, 2025
1 parent f918d3a commit d73bb45
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions crates/ruff/src/args.rs
Original file line number Diff line number Diff line change
Expand Up @@ -973,8 +973,8 @@ The path `{value}` does not point to a configuration file"
let key = key.trim_ascii();
let value = value.trim_ascii_start();

if let Some(OptionEntry::Set(set)) = Options::metadata().find(key) {
if !value.starts_with('{') {
match Options::metadata().find(key) {
Some(OptionEntry::Set(set)) if !value.starts_with('{') => {
let prefixed_subkeys = format!("{set}")
.trim_ascii()
.split('\n')
Expand All @@ -992,11 +992,12 @@ Possible choices:
{prefixed_subkeys}"
));
}
} else {
tip.push_str(&format!(
"\n\n{}:\n\n{underlying_error}",
config_parse_error.description()
));
_ => {
tip.push_str(&format!(
"\n\n{}:\n\n{underlying_error}",
config_parse_error.description()
));
}
}
}
let tip = tip.trim_end().to_owned().into();
Expand Down

0 comments on commit d73bb45

Please sign in to comment.