mirror of
https://github.com/astral-sh/ruff.git
synced 2025-10-22 00:01:56 +00:00
refactor: Rename RuleCodePrefix to RuleSelector
More accurate since the enum also encompasses: * ALL (which isn't a prefix at all) * fully-qualified rule codes (which aren't prefixes unless you say they're a prefix to the empty string but that's not intuitive)
This commit is contained in:
parent
7fc42f8f85
commit
b19258a243
20 changed files with 256 additions and 276 deletions
|
@ -78,7 +78,7 @@ mod tests {
|
|||
fp.write(f"{indent}{pascal_case(plugin)},")
|
||||
fp.write("\n")
|
||||
|
||||
elif line.strip() == "Linter::Ruff => Prefixes::Single(RuleCodePrefix::RUF),":
|
||||
elif line.strip() == "Linter::Ruff => Prefixes::Single(RuleSelector::RUF),":
|
||||
prefix = 'todo!("Fill-in prefix after generating codes")'
|
||||
fp.write(
|
||||
f"{indent}Linter::{pascal_case(plugin)} => Prefixes::Single({prefix}),"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue