mirror of
https://github.com/astral-sh/ruff.git
synced 2025-08-14 23:50:24 +00:00
Remove type parameter from parse_*
methods (#9466)
This commit is contained in:
parent
25bafd2d66
commit
f192c72596
13 changed files with 98 additions and 84 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue