mirror of
https://github.com/astral-sh/ruff.git
synced 2025-09-27 12:29:28 +00:00
Remove Parse
trait (#6235)
This commit is contained in:
parent
83fe103d6e
commit
debfca3a11
25 changed files with 235 additions and 1420 deletions
|
@ -36,13 +36,13 @@ impl NeedsParentheses for ExprName {
|
|||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use ruff_python_ast::{ModModule, Ranged};
|
||||
use ruff_python_parser::Parse;
|
||||
use ruff_python_ast::Ranged;
|
||||
use ruff_python_parser::parse_program;
|
||||
use ruff_text_size::{TextRange, TextSize};
|
||||
|
||||
#[test]
|
||||
fn name_range_with_comments() {
|
||||
let source = ModModule::parse("a # comment", "file.py").unwrap();
|
||||
let source = parse_program("a # comment", "file.py").unwrap();
|
||||
|
||||
let expression_statement = source
|
||||
.body
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue