Skip to content

Commit

Permalink
Change from manual to automatic
Browse files Browse the repository at this point in the history
  • Loading branch information
evanrittenhouse committed Jun 15, 2023
1 parent 1bea35c commit 272b811
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crates/ruff/src/rules/flake8_commas/rules/trailing_commas.rs
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ pub(crate) fn trailing_commas(
let comma = prev.spanned.unwrap();
let mut diagnostic = Diagnostic::new(ProhibitedTrailingComma, comma.1);
if settings.rules.should_fix(Rule::ProhibitedTrailingComma) {
diagnostic.set_fix(Fix::manual(Edit::range_deletion(diagnostic.range())));
diagnostic.set_fix(Fix::automatic(Edit::range_deletion(diagnostic.range())));
}
diagnostics.push(diagnostic);
}
Expand Down Expand Up @@ -366,7 +366,7 @@ pub(crate) fn trailing_commas(
// removing any brackets in the same linter pass - doing both at the same time could
// lead to a syntax error.
let contents = locator.slice(missing_comma.1);
diagnostic.set_fix(Fix::manual(Edit::range_replacement(
diagnostic.set_fix(Fix::automatic(Edit::range_replacement(
format!("{contents},"),
missing_comma.1,
)));
Expand Down

0 comments on commit 272b811

Please sign in to comment.