mirror of
https://github.com/astral-sh/ruff.git
synced 2025-09-29 13:25:17 +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
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue