From f1c2fc81a9eae3f098883b4764a820104eae835e Mon Sep 17 00:00:00 2001 From: Dhruv Manilawala Date: Wed, 14 Feb 2024 23:56:51 +0530 Subject: [PATCH] Fix from rebase --- crates/ruff_python_formatter/src/string/mod.rs | 2 +- crates/ruff_python_formatter/src/string/normalize.rs | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/crates/ruff_python_formatter/src/string/mod.rs b/crates/ruff_python_formatter/src/string/mod.rs index df307200e6904..1980e1a3923f2 100644 --- a/crates/ruff_python_formatter/src/string/mod.rs +++ b/crates/ruff_python_formatter/src/string/mod.rs @@ -1,7 +1,7 @@ use bitflags::bitflags; pub(crate) use any::AnyString; -pub(crate) use normalize::{NormalizedString, StringNormalizer}; +pub(crate) use normalize::{normalize_string, NormalizedString, StringNormalizer}; use ruff_formatter::format_args; use ruff_source_file::Locator; use ruff_text_size::{TextLen, TextRange, TextSize}; diff --git a/crates/ruff_python_formatter/src/string/normalize.rs b/crates/ruff_python_formatter/src/string/normalize.rs index 521b7ce2dc1b3..643db2db67a9a 100644 --- a/crates/ruff_python_formatter/src/string/normalize.rs +++ b/crates/ruff_python_formatter/src/string/normalize.rs @@ -1,8 +1,11 @@ use std::borrow::Cow; +use ruff_formatter::FormatContext; use ruff_source_file::Locator; use ruff_text_size::{Ranged, TextRange}; +use crate::context::FStringState; +use crate::options::PythonVersion; use crate::prelude::*; use crate::preview::is_hex_codes_in_unicode_sequences_enabled; use crate::string::{QuoteChar, Quoting, StringPart, StringPrefix, StringQuotes};