File tree Expand file tree Collapse file tree 1 file changed +1
-4
lines changed
crates/ruff_linter/src/rules/flake8_type_checking Expand file tree Collapse file tree 1 file changed +1
-4
lines changed Original file line number Diff line number Diff line change @@ -394,10 +394,7 @@ impl<'a> source_order::SourceOrderVisitor<'a> for QuoteAnnotator<'a> {
394
394
let opposite_quote = & self . stylist . quote ( ) . opposite ( ) . as_char ( ) . to_string ( ) ;
395
395
// If the quotes we are going to insert in this source already exists set the auto quote outcome
396
396
// 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 ( '\\' ) {
401
398
self . failed = true ;
402
399
}
403
400
source = source. replace ( self . stylist . quote ( ) . as_char ( ) , opposite_quote) ;
You can’t perform that action at this time.
0 commit comments