Move universal newline handling into its own crate (#4729)

This commit is contained in:
Charlie Marsh 2023-05-31 12:00:47 -04:00 committed by GitHub
parent e209b5fc5f
commit 9d0ffd33ca
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
49 changed files with 80 additions and 51 deletions

View file

@ -4,6 +4,7 @@ use std::path::Path;
use itertools::Itertools;
use log::error;
use num_traits::Zero;
use ruff_newlines::UniversalNewlineIterator;
use ruff_text_size::{TextRange, TextSize};
use rustc_hash::{FxHashMap, FxHashSet};
use rustpython_parser::ast::{
@ -14,7 +15,6 @@ use rustpython_parser::{lexer, Mode, Tok};
use smallvec::SmallVec;
use crate::call_path::CallPath;
use crate::newlines::UniversalNewlineIterator;
use crate::source_code::{Indexer, Locator};
use crate::statement_visitor::{walk_body, walk_stmt, StatementVisitor};