mirror of
https://github.com/astral-sh/ruff.git
synced 2025-09-27 20:42:10 +00:00
Move CallPath
into its own module (#3847)
This commit is contained in:
parent
2f90157ce2
commit
d822e08111
34 changed files with 129 additions and 102 deletions
|
@ -208,9 +208,10 @@ impl Utf8Index {
|
|||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use crate::source_code::locator::{AsciiIndex, Index, Utf8Index};
|
||||
use rustpython_parser::ast::Location;
|
||||
|
||||
use crate::source_code::locator::{AsciiIndex, Index, Utf8Index};
|
||||
|
||||
fn index_ascii(content: &str) -> AsciiIndex {
|
||||
match Index::from(content) {
|
||||
Index::Ascii(ascii) => ascii,
|
||||
|
|
|
@ -8,9 +8,9 @@ use rustpython_parser::ast::Location;
|
|||
use rustpython_parser::lexer::LexResult;
|
||||
use rustpython_parser::Tok;
|
||||
|
||||
use crate::source_code::Locator;
|
||||
use ruff_rustpython::vendor;
|
||||
|
||||
use crate::source_code::Locator;
|
||||
use crate::str::leading_quote;
|
||||
use crate::types::Range;
|
||||
|
||||
|
@ -213,11 +213,12 @@ fn detect_line_ending(contents: &str) -> Option<LineEnding> {
|
|||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use crate::source_code::stylist::{detect_line_ending, Indentation, LineEnding, Quote};
|
||||
use crate::source_code::{Locator, Stylist};
|
||||
use rustpython_parser::lexer::lex;
|
||||
use rustpython_parser::Mode;
|
||||
|
||||
use crate::source_code::stylist::{detect_line_ending, Indentation, LineEnding, Quote};
|
||||
use crate::source_code::{Locator, Stylist};
|
||||
|
||||
#[test]
|
||||
fn indentation() {
|
||||
let contents = r#"x = 1"#;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue