mirror of
https://github.com/astral-sh/ruff.git
synced 2025-08-14 23:50:24 +00:00
Prefer the configured quote style
<!-- Thank you for contributing to Ruff! To help us out with reviewing, please consider the following: - Does this pull request include a summary of the change? (See below.) - Does this pull request include a descriptive title? - Does this pull request include references to any relevant issues? --> ## Summary This PR extends the string formatting to respect the configured quote style. <!-- What's the purpose of the change? What does it do, and why? --> ## Test Plan Extended the string test with new cases and set it up to run twice: Once with the `quote_style: Doube`, and once with `quote_style: Single` single and double quotes. <!-- How was it tested? -->
This commit is contained in:
parent
f18a1f70de
commit
313711aaf9
5 changed files with 165 additions and 24 deletions
|
@ -109,7 +109,7 @@ impl QuoteStyle {
|
|||
}
|
||||
|
||||
#[must_use]
|
||||
pub const fn opposite(self) -> QuoteStyle {
|
||||
pub const fn invert(self) -> QuoteStyle {
|
||||
match self {
|
||||
QuoteStyle::Single => QuoteStyle::Double,
|
||||
QuoteStyle::Double => QuoteStyle::Single,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue