From 39ad2afb83ab8e98eeecc0caf647f2bf8c468e21 Mon Sep 17 00:00:00 2001 From: Dhruv Manilawala Date: Wed, 26 Jul 2023 22:28:30 +0530 Subject: [PATCH] Actually resolve merge conflicts --- crates/ruff/src/importer/insertion.rs | 4 ++-- crates/ruff_shrinking/src/main.rs | 6 +----- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/crates/ruff/src/importer/insertion.rs b/crates/ruff/src/importer/insertion.rs index 2da0141db5f64..33e9ff317b451 100644 --- a/crates/ruff/src/importer/insertion.rs +++ b/crates/ruff/src/importer/insertion.rs @@ -313,7 +313,7 @@ mod tests { fn start_of_file() -> Result<()> { fn insert(contents: &str) -> Result { let program = Suite::parse(contents, "")?; - let tokens: Vec = ruff_rustpython::tokenize(contents, Mode::Module); + let tokens: Vec = ruff_python_parser::tokenize(contents, Mode::Module); let locator = Locator::new(contents); let stylist = Stylist::from_tokens(&tokens, &locator); Ok(Insertion::start_of_file(&program, &locator, &stylist)) @@ -424,7 +424,7 @@ x = 1 #[test] fn start_of_block() { fn insert(contents: &str, offset: TextSize) -> Insertion { - let tokens: Vec = ruff_rustpython::tokenize(contents, Mode::Module); + let tokens: Vec = ruff_python_parser::tokenize(contents, Mode::Module); let locator = Locator::new(contents); let stylist = Stylist::from_tokens(&tokens, &locator); Insertion::start_of_block(offset, &locator, &stylist) diff --git a/crates/ruff_shrinking/src/main.rs b/crates/ruff_shrinking/src/main.rs index 2ed5d0001a660..8d119758a348e 100644 --- a/crates/ruff_shrinking/src/main.rs +++ b/crates/ruff_shrinking/src/main.rs @@ -276,11 +276,7 @@ impl Strategy for StrategyRemoveToken { input: &'a str, _ast: &'a Suite, ) -> Result> { -<<<<<<< HEAD - let token_ranges: Vec<_> = ruff_python_parser::tokenize(input) -======= - let token_ranges: Vec<_> = ruff_rustpython::tokenize(input, Mode::Module) ->>>>>>> 023d1dc72 (Use Jupyter mode for the parser with Notebook files) + let token_ranges: Vec<_> = ruff_python_parser::tokenize(input, Mode::Module) .into_iter() // At this point we know we have valid python code .map(Result::unwrap)