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 @@ -398,10 +398,7 @@ impl<'a> source_order::SourceOrderVisitor<'a> for QuoteAnnotator<'a> {
398
398
let opposite_quote = & self . stylist . quote ( ) . opposite ( ) . as_char ( ) . to_string ( ) ;
399
399
// If the quotes we are going to insert in this source already exists set the auto quote outcome
400
400
// 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 ( '\\' ) {
405
402
self . failed = true ;
406
403
}
407
404
source = source. replace ( self . stylist . quote ( ) . as_char ( ) , opposite_quote) ;
You can’t perform that action at this time.
0 commit comments