Remove Parse trait (#6235)

This commit is contained in:
Micha Reiser 2023-08-01 18:35:03 +02:00 committed by GitHub
parent 83fe103d6e
commit debfca3a11
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
25 changed files with 235 additions and 1420 deletions

View file

@ -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(())
}