Skip to content

Commit

Permalink
more rebase fallout
Browse files Browse the repository at this point in the history
  • Loading branch information
konstin committed Jun 2, 2023
1 parent e1ccb11 commit d1c7a07
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion crates/ruff/src/autofix/codemods.rs
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,11 @@ pub(crate) fn remove_imports<'a>(
}
}

Ok(Some(tree.codegen_stylist(&stylist)))
if aliases.is_empty() {
return Ok(None);
}

Ok(Some(tree.codegen_stylist(stylist)))
}

/// Given an import statement, remove any imports that are not specified in the `imports` slice.
Expand Down

0 comments on commit d1c7a07

Please sign in to comment.