mirror of
https://github.com/astral-sh/ruff.git
synced 2025-09-27 04:19:18 +00:00
Remove Parse
trait (#6235)
This commit is contained in:
parent
83fe103d6e
commit
debfca3a11
25 changed files with 235 additions and 1420 deletions
|
@ -5,8 +5,7 @@ use std::fs;
|
|||
use std::path::PathBuf;
|
||||
|
||||
use anyhow::Result;
|
||||
use ruff_python_ast::Suite;
|
||||
use ruff_python_parser::Parse;
|
||||
use ruff_python_parser::parse_suite;
|
||||
|
||||
#[derive(clap::Args)]
|
||||
pub(crate) struct Args {
|
||||
|
@ -17,7 +16,7 @@ pub(crate) struct Args {
|
|||
|
||||
pub(crate) fn main(args: &Args) -> Result<()> {
|
||||
let contents = fs::read_to_string(&args.file)?;
|
||||
let python_ast = Suite::parse(&contents, &args.file.to_string_lossy())?;
|
||||
let python_ast = parse_suite(&contents, &args.file.to_string_lossy())?;
|
||||
println!("{python_ast:#?}");
|
||||
Ok(())
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue