Skip to content

Commit

Permalink
review tidy
Browse files Browse the repository at this point in the history
  • Loading branch information
davidszotten committed Jul 31, 2023
1 parent 6b121a5 commit 6f79f32
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion crates/ruff_python_formatter/src/expression/string.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ use crate::expression::Expr;
use crate::prelude::*;
use crate::QuoteStyle;

#[derive(Copy, Clone)]
enum Quoting {
CanChange,
Preserve,
Expand All @@ -37,7 +38,7 @@ impl<'a> AnyString<'a> {
if joined_str.values.iter().any(|value| match value {
Expr::FormattedValue(ast::ExprFormattedValue { range, .. }) => {
let string_content = locator.slice(*range);
string_content.contains('"') || string_content.contains('\'')
string_content.contains(['"', '\''])
}
_ => false,
}) {
Expand Down

0 comments on commit 6f79f32

Please sign in to comment.