Rename FixKind to FixAvailability (#7658)

**Summary** `FixKind` feels to generic, i suggest renaming it to
something like `FixAvailibility`.

Commands used:

```bash
rg FixKind --files-with-matches | xargs sed -i 's/FixKind/FixAvailability/g'
rg fix_kind --files-with-matches | xargs sed -i 's/fix_kind/fix_availability/g'
rg FIX_KIND --files-with-matches | xargs sed -i 's/FIX_KIND/FIX_AVAILABILITY/g'
cargo fmt
```

`rg -i "fix.kind"` doesn't show any matches anymore.
This commit is contained in:
konsti 2023-10-02 16:38:25 +02:00 committed by GitHub
parent ebdfcee87f
commit 0961f008b8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
76 changed files with 185 additions and 179 deletions

View file

@ -405,7 +405,7 @@ fn register_rules<'a>(input: impl Iterator<Item = &'a Rule>) -> TokenStream {
rule_message_formats_match_arms
.extend(quote! {#(#attrs)* Self::#name => <#path as ruff_diagnostics::Violation>::message_formats(),});
rule_fixable_match_arms.extend(
quote! {#(#attrs)* Self::#name => <#path as ruff_diagnostics::Violation>::FIX_KIND,},
quote! {#(#attrs)* Self::#name => <#path as ruff_diagnostics::Violation>::FIX_AVAILABILITY,},
);
rule_explanation_match_arms
.extend(quote! {#(#attrs)* Self::#name => #path::explanation(),});
@ -448,7 +448,7 @@ fn register_rules<'a>(input: impl Iterator<Item = &'a Rule>) -> TokenStream {
}
/// Returns the fix status of this rule.
pub const fn fixable(&self) -> ruff_diagnostics::FixKind {
pub const fn fixable(&self) -> ruff_diagnostics::FixAvailability {
match self { #rule_fixable_match_arms }
}
}