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

@ -1516,7 +1516,7 @@ fn docstring_format_source(
let source_type = options.source_type();
let (tokens, comment_ranges) =
ruff_python_index::tokens_and_ranges(source, source_type).map_err(ParseError::from)?;
let module = ruff_python_parser::parse_ok_tokens(tokens, source, source_type.as_mode())?;
let module = ruff_python_parser::parse_tokens(tokens, source, source_type.as_mode())?;
let source_code = ruff_formatter::SourceCode::new(source);
let comments = crate::Comments::from_ast(&module, source_code, &comment_ranges);
let locator = Locator::new(source);