From 1b58828dd1f8cc093854ba7ed3a0f6332f35ecc0 Mon Sep 17 00:00:00 2001 From: Shaygan Hooshyari Date: Tue, 11 Jun 2024 10:23:45 -0700 Subject: [PATCH] Update crates/ruff_linter/src/rules/flake8_type_checking/helpers.rs Co-authored-by: Dhruv Manilawala --- .../ruff_linter/src/rules/flake8_type_checking/helpers.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/crates/ruff_linter/src/rules/flake8_type_checking/helpers.rs b/crates/ruff_linter/src/rules/flake8_type_checking/helpers.rs index 8170a13bcf41d..12b24cddb8a6d 100644 --- a/crates/ruff_linter/src/rules/flake8_type_checking/helpers.rs +++ b/crates/ruff_linter/src/rules/flake8_type_checking/helpers.rs @@ -265,10 +265,10 @@ pub(crate) fn quote_annotation( let quote = stylist.quote(); let annotation = generator.expr(expr); - let annotation_new = if annotation.contains(stylist.quote().as_char()) { + let annotation_new = if annotation.contains(quote.as_char()) { annotation.replace( - stylist.quote().as_char(), - &stylist.quote().opposite().as_char().to_string(), + quote.as_char(), + "e.opposite().as_char().to_string(), ) } else { annotation