Remove prelude from ruff_python_ast (#5369)

## Summary

Per @MichaReiser, this is causing more confusion than it is helpful.
This commit is contained in:
Charlie Marsh 2023-06-26 11:43:49 -04:00 committed by GitHub
parent baa7264ca4
commit fa1b85b3da
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
28 changed files with 688 additions and 656 deletions

View file

@ -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 {