Move CallPath into its own module (#3847)

This commit is contained in:
Charlie Marsh 2023-04-01 11:25:04 -04:00 committed by GitHub
parent 2f90157ce2
commit d822e08111
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
34 changed files with 129 additions and 102 deletions

View file

@ -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,

View file

@ -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"#;