mirror of
https://github.com/astral-sh/ruff.git
synced 2025-09-29 05:15:12 +00:00
Remove prelude from ruff_python_ast
(#5369)
## Summary Per @MichaReiser, this is causing more confusion than it is helpful.
This commit is contained in:
parent
baa7264ca4
commit
fa1b85b3da
28 changed files with 688 additions and 656 deletions
|
@ -1,9 +1,12 @@
|
|||
use std::fmt::{Debug, Formatter, Write};
|
||||
|
||||
use itertools::Itertools;
|
||||
use rustpython_parser::ast::Ranged;
|
||||
|
||||
use ruff_formatter::SourceCode;
|
||||
|
||||
use crate::comments::node_key::NodeRefEqualityKey;
|
||||
use crate::comments::{CommentsMap, SourceComment};
|
||||
use itertools::Itertools;
|
||||
use ruff_formatter::SourceCode;
|
||||
use ruff_python_ast::prelude::*;
|
||||
use std::fmt::{Debug, Formatter, Write};
|
||||
|
||||
/// Prints a debug representation of [`SourceComment`] that includes the comment's text
|
||||
pub(crate) struct DebugComment<'a> {
|
||||
|
@ -176,14 +179,16 @@ impl Debug for DebugNodeCommentSlice<'_> {
|
|||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use crate::comments::map::MultiMap;
|
||||
use crate::comments::{CommentLinePosition, Comments, CommentsMap, SourceComment};
|
||||
use insta::assert_debug_snapshot;
|
||||
use ruff_formatter::SourceCode;
|
||||
use ruff_python_ast::node::AnyNode;
|
||||
use ruff_text_size::{TextRange, TextSize};
|
||||
use rustpython_parser::ast::{StmtBreak, StmtContinue};
|
||||
|
||||
use ruff_formatter::SourceCode;
|
||||
use ruff_python_ast::node::AnyNode;
|
||||
|
||||
use crate::comments::map::MultiMap;
|
||||
use crate::comments::{CommentLinePosition, Comments, CommentsMap, SourceComment};
|
||||
|
||||
#[test]
|
||||
fn debug() {
|
||||
let continue_statement = AnyNode::from(StmtContinue {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue