Skip to content

Commit

Permalink
Update crates/ruff_linter/src/rules/flake8_type_checking/helpers.rs
Browse files Browse the repository at this point in the history
Co-authored-by: Dhruv Manilawala <[email protected]>
  • Loading branch information
Glyphack and dhruvmanila authored Jun 11, 2024
1 parent 29e0d4a commit 1b58828
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions crates/ruff_linter/src/rules/flake8_type_checking/helpers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
&quote.opposite().as_char().to_string(),
)
} else {
annotation
Expand Down

0 comments on commit 1b58828

Please sign in to comment.