Skip to content

Commit c3428cf

Browse files
committed
Remove \n from cases
1 parent a8d0782 commit c3428cf

File tree

1 file changed

+1
-4
lines changed
  • crates/ruff_linter/src/rules/flake8_type_checking

1 file changed

+1
-4
lines changed

crates/ruff_linter/src/rules/flake8_type_checking/helpers.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -398,10 +398,7 @@ impl<'a> source_order::SourceOrderVisitor<'a> for QuoteAnnotator<'a> {
398398
let opposite_quote = &self.stylist.quote().opposite().as_char().to_string();
399399
// If the quotes we are going to insert in this source already exists set the auto quote outcome
400400
// to failed. Because this means we are inserting quotes that are in the string and they collect.
401-
if source.contains(opposite_quote)
402-
|| source.contains('\n')
403-
|| source.contains('\\')
404-
{
401+
if source.contains(opposite_quote) || source.contains('\\') {
405402
self.failed = true;
406403
}
407404
source = source.replace(self.stylist.quote().as_char(), opposite_quote);

0 commit comments

Comments
 (0)