mirror of
https://github.com/astral-sh/ruff.git
synced 2025-09-28 21:05:08 +00:00
Remove layout values from AnyStringPart
(#13681)
This commit is contained in:
parent
93eff7f174
commit
b9827a4122
5 changed files with 45 additions and 62 deletions
|
@ -9,7 +9,6 @@ pub struct FormatBytesLiteral;
|
|||
impl FormatNodeRule<BytesLiteral> for FormatBytesLiteral {
|
||||
fn fmt_fields(&self, item: &BytesLiteral, f: &mut PyFormatter) -> FormatResult<()> {
|
||||
StringNormalizer::from_context(f.context())
|
||||
.with_preferred_quote_style(f.options().quote_style())
|
||||
.normalize(item.into())
|
||||
.fmt(f)
|
||||
}
|
||||
|
|
|
@ -40,9 +40,7 @@ impl Format<PyFormatContext<'_>> for FormatFString<'_> {
|
|||
self.quoting
|
||||
};
|
||||
|
||||
let normalizer = StringNormalizer::from_context(f.context())
|
||||
.with_quoting(quoting)
|
||||
.with_preferred_quote_style(f.options().quote_style());
|
||||
let normalizer = StringNormalizer::from_context(f.context()).with_quoting(quoting);
|
||||
|
||||
// If f-string formatting is disabled (not in preview), then we will
|
||||
// fall back to the previous behavior of normalizing the f-string.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue