Skip to content

Commit 9b49d98

Browse files
committed
Remove \n from cases
1 parent 0496925 commit 9b49d98

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
@@ -394,10 +394,7 @@ impl<'a> source_order::SourceOrderVisitor<'a> for QuoteAnnotator<'a> {
394394
let opposite_quote = &self.stylist.quote().opposite().as_char().to_string();
395395
// If the quotes we are going to insert in this source already exists set the auto quote outcome
396396
// to failed. Because this means we are inserting quotes that are in the string and they collect.
397-
if source.contains(opposite_quote)
398-
|| source.contains('\n')
399-
|| source.contains('\\')
400-
{
397+
if source.contains(opposite_quote) || source.contains('\\') {
401398
self.failed = true;
402399
}
403400
source = source.replace(self.stylist.quote().as_char(), opposite_quote);

0 commit comments

Comments
 (0)