Conversation
|
Current dependencies on/for this PR: This comment was auto-generated by Graphite. |
|
I think this is more akin to "availability" -- it's an indicator of how often the rule is fixable, which is separate from the confidence of the fix itself which is the |
a83fb23 to
7952051
Compare
FixKind to FixConfidenceFixKind to FixAvailability
|
sorry i was blind |
7952051 to
d02ef0b
Compare
PR Check ResultsEcosystem✅ ecosystem check detected no changes. |
crates/ruff_dev/src/generate_docs.rs
Outdated
| let fix_kind = rule.fixable(); | ||
| if matches!(fix_kind, FixKind::Always | FixKind::Sometimes) { | ||
| output.push_str(&fix_kind.to_string()); | ||
| let fix_confidence = rule.fixable(); |
There was a problem hiding this comment.
Should probably update this variable name throughout
There was a problem hiding this comment.
is FixAvailability the name we want to go with? If so i'll change everything
e402183 to
1addc0c
Compare
7c087d3 to
cded4c2
Compare
cded4c2 to
bfb34b4
Compare
|
Updated the PR description |
crates/ruff_linter/src/test.rs
Outdated
| (false, FixKind::Always) => { | ||
| panic!("Rule {rule:?} is marked to always-fixable but the diagnostic has no fix. Either ensure you always emit a fix or change `Violation::FIX_KINDd` to either `FixKind::Sometimes` or `FixKind::None") | ||
| (false, FixAvailability::Always) => { | ||
| panic!("Rule {rule:?} is marked to always-fixable but the diagnostic has no fix. Either ensure you always emit a fix or change `Violation::FIX_AVAILIBITYd` to either `FixAvailability::Sometimes` or `FixAvailability::None") |
There was a problem hiding this comment.
Looks like a typo in Violation::FIX_AVAILIBITYd (which was already present before, but worth fixing).
|
Please ping me if there are any PRs that need merge conflicts due to this fixed |

Summary
FixKindfeels to generic, i suggest renaming it to something likeFixAvailibility.Commands used:
rg -i "fix.kind"doesn't show any matches anymore.