mirror of
https://github.com/astral-sh/ruff.git
synced 2025-08-12 06:38:21 +00:00
Implement a common trait for the string flags (#11564)
This commit is contained in:
parent
6be00d5775
commit
246a3388ee
20 changed files with 184 additions and 153 deletions
|
@ -1,5 +1,5 @@
|
|||
use ruff_formatter::write;
|
||||
use ruff_python_ast::{AnyStringFlags, FString};
|
||||
use ruff_python_ast::{AnyStringFlags, FString, StringFlags};
|
||||
use ruff_source_file::Locator;
|
||||
|
||||
use crate::prelude::*;
|
||||
|
|
|
@ -3,6 +3,7 @@ use std::borrow::Cow;
|
|||
use ruff_formatter::{format_args, write, Buffer, RemoveSoftLinesBuffer};
|
||||
use ruff_python_ast::{
|
||||
ConversionFlag, Expr, FStringElement, FStringExpressionElement, FStringLiteralElement,
|
||||
StringFlags,
|
||||
};
|
||||
use ruff_text_size::Ranged;
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ use memchr::memchr2;
|
|||
|
||||
use ruff_python_ast::{
|
||||
self as ast, AnyNodeRef, AnyStringFlags, Expr, ExprBytesLiteral, ExprFString,
|
||||
ExprStringLiteral, ExpressionRef, StringLiteral,
|
||||
ExprStringLiteral, ExpressionRef, StringFlags, StringLiteral,
|
||||
};
|
||||
use ruff_source_file::Locator;
|
||||
use ruff_text_size::{Ranged, TextRange};
|
||||
|
|
|
@ -8,7 +8,7 @@ use std::{borrow::Cow, collections::VecDeque};
|
|||
use itertools::Itertools;
|
||||
|
||||
use ruff_formatter::printer::SourceMapGeneration;
|
||||
use ruff_python_ast::str::Quote;
|
||||
use ruff_python_ast::{str::Quote, StringFlags};
|
||||
use ruff_python_parser::ParseError;
|
||||
use {once_cell::sync::Lazy, regex::Regex};
|
||||
use {
|
||||
|
|
|
@ -5,7 +5,7 @@ use ruff_python_ast::str::Quote;
|
|||
use ruff_python_ast::{
|
||||
self as ast,
|
||||
str_prefix::{AnyStringPrefix, StringLiteralPrefix},
|
||||
AnyStringFlags,
|
||||
AnyStringFlags, StringFlags,
|
||||
};
|
||||
use ruff_text_size::{Ranged, TextRange};
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@ use std::borrow::Cow;
|
|||
use std::iter::FusedIterator;
|
||||
|
||||
use ruff_formatter::FormatContext;
|
||||
use ruff_python_ast::{str::Quote, AnyStringFlags};
|
||||
use ruff_python_ast::{str::Quote, AnyStringFlags, StringFlags};
|
||||
use ruff_source_file::Locator;
|
||||
use ruff_text_size::{Ranged, TextRange};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue