Remove type parameter from parse_* methods (#9466)

This commit is contained in:
Micha Reiser 2024-01-11 19:41:19 +01:00 committed by GitHub
parent 25bafd2d66
commit f192c72596
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 98 additions and 84 deletions

View file

@ -8,7 +8,7 @@ use clap::{command, Parser, ValueEnum};
use ruff_formatter::SourceCode;
use ruff_python_ast::PySourceType;
use ruff_python_index::tokens_and_ranges;
use ruff_python_parser::{parse_ok_tokens, AsMode};
use ruff_python_parser::{parse_tokens, AsMode};
use ruff_text_size::Ranged;
use crate::comments::collect_comments;
@ -51,7 +51,7 @@ pub fn format_and_debug_print(source: &str, cli: &Cli, source_path: &Path) -> Re
// Parse the AST.
let module =
parse_ok_tokens(tokens, source, source_type.as_mode()).context("Syntax error in input")?;
parse_tokens(tokens, source, source_type.as_mode()).context("Syntax error in input")?;
let options = PyFormatOptions::from_extension(source_path)
.with_preview(if cli.preview {