mirror of
https://github.com/astral-sh/ruff.git
synced 2025-09-28 04:45:01 +00:00
Move Python whitespace utilities into new ruff_python_whitespace
crate (#4993)
## Summary `ruff_newlines` becomes `ruff_python_whitespace`, and includes the existing "universal newline" handlers alongside the Python whitespace-specific utilities.
This commit is contained in:
parent
e86f12a1ec
commit
1d756dc3a7
57 changed files with 153 additions and 140 deletions
|
@ -8,7 +8,7 @@ use rustpython_parser::ast::{
|
|||
Excepthandler, Expr, Identifier, MatchCase, Operator, Pattern, Stmt, Suite, Withitem,
|
||||
};
|
||||
|
||||
use ruff_newlines::LineEnding;
|
||||
use ruff_python_whitespace::LineEnding;
|
||||
|
||||
use crate::source_code::stylist::{Indentation, Quote, Stylist};
|
||||
|
||||
|
@ -1459,7 +1459,7 @@ mod tests {
|
|||
use rustpython_ast::Suite;
|
||||
use rustpython_parser::Parse;
|
||||
|
||||
use ruff_newlines::LineEnding;
|
||||
use ruff_python_whitespace::LineEnding;
|
||||
|
||||
use crate::source_code::stylist::{Indentation, Quote};
|
||||
use crate::source_code::Generator;
|
||||
|
|
|
@ -6,7 +6,7 @@ use memchr::{memchr2, memrchr2};
|
|||
use once_cell::unsync::OnceCell;
|
||||
use ruff_text_size::{TextLen, TextRange, TextSize};
|
||||
|
||||
use ruff_newlines::find_newline;
|
||||
use ruff_python_whitespace::find_newline;
|
||||
|
||||
use crate::source_code::{LineIndex, OneIndexed, SourceCode, SourceLocation};
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ use std::fmt;
|
|||
use std::ops::Deref;
|
||||
|
||||
use once_cell::unsync::OnceCell;
|
||||
use ruff_newlines::{find_newline, LineEnding};
|
||||
use ruff_python_whitespace::{find_newline, LineEnding};
|
||||
use rustpython_literal::escape::Quote as StrQuote;
|
||||
use rustpython_parser::lexer::LexResult;
|
||||
use rustpython_parser::Tok;
|
||||
|
@ -166,7 +166,7 @@ mod tests {
|
|||
use rustpython_parser::lexer::lex;
|
||||
use rustpython_parser::Mode;
|
||||
|
||||
use ruff_newlines::{find_newline, LineEnding};
|
||||
use ruff_python_whitespace::{find_newline, LineEnding};
|
||||
|
||||
use crate::source_code::stylist::{Indentation, Quote};
|
||||
use crate::source_code::{Locator, Stylist};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue