mirror of
https://github.com/astral-sh/ruff.git
synced 2025-09-30 05:45:24 +00:00
Improve display of rules in --show-settings
(#11003)
Closes https://github.com/astral-sh/ruff/issues/11002
This commit is contained in:
parent
0a6327418d
commit
16cc9bd78d
2 changed files with 123 additions and 121 deletions
|
@ -291,7 +291,9 @@ impl Display for RuleSet {
|
|||
} else {
|
||||
writeln!(f, "[")?;
|
||||
for rule in self {
|
||||
writeln!(f, "\t{rule:?},")?;
|
||||
let name = rule.as_ref();
|
||||
let code = rule.noqa_code();
|
||||
writeln!(f, "\t{name} ({code}),")?;
|
||||
}
|
||||
write!(f, "]")?;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue