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

@ -102,12 +102,12 @@ use ruff_python_ast::Mod;
use ruff_python_trivia::{CommentRanges, PythonWhitespace};
use ruff_source_file::Locator;
use ruff_text_size::{Ranged, TextRange};
pub(crate) use visitor::collect_comments;
use crate::comments::debug::{DebugComment, DebugComments};
use crate::comments::map::{LeadingDanglingTrailing, MultiMap};
use crate::comments::node_key::NodeRefEqualityKey;
use crate::comments::visitor::{CommentsMapBuilder, CommentsVisitor};
pub(crate) use visitor::collect_comments;
mod debug;
pub(crate) mod format;
@ -563,8 +563,7 @@ mod tests {
use ruff_formatter::SourceCode;
use ruff_python_ast::{Mod, 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_python_trivia::CommentRanges;
use crate::comments::Comments;
@ -581,7 +580,7 @@ mod tests {
let source_type = PySourceType::Python;
let (tokens, comment_ranges) =
tokens_and_ranges(source, source_type).expect("Expect source to be valid Python");
let parsed = parse_ok_tokens(tokens, source, source_type.as_mode())
let parsed = parse_tokens(tokens, source, source_type.as_mode())
.expect("Expect source to be valid Python");
CommentsTestCase {