Move {AnyNodeRef, AstNode} to ruff_python_ast crate root (#8030)

This is a do-over of https://github.com/astral-sh/ruff/pull/8011, which
I accidentally merged into a non-`main` branch. Sorry!
This commit is contained in:
Charlie Marsh 2023-10-17 20:01:18 -04:00 committed by GitHub
parent d85950ce5a
commit d685107638
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
72 changed files with 76 additions and 75 deletions

View file

@ -1,5 +1,5 @@
use ruff_formatter::{write, Argument, Arguments, FormatError};
use ruff_python_ast::node::AnyNodeRef;
use ruff_python_ast::AnyNodeRef;
use ruff_python_ast::{
ElifElseClause, ExceptHandlerExceptHandler, MatchCase, StmtClassDef, StmtFor, StmtFunctionDef,
StmtIf, StmtMatch, StmtTry, StmtWhile, StmtWith, Suite,

View file

@ -1,5 +1,5 @@
use ruff_formatter::{format_args, write};
use ruff_python_ast::node::AstNode;
use ruff_python_ast::AstNode;
use ruff_python_ast::StmtGlobal;
use crate::comments::{SourceComment, SuppressionKind};

View file

@ -1,5 +1,5 @@
use ruff_formatter::{format_args, write};
use ruff_python_ast::node::AnyNodeRef;
use ruff_python_ast::AnyNodeRef;
use ruff_python_ast::{ElifElseClause, StmtIf};
use crate::comments::SourceComment;

View file

@ -1,5 +1,5 @@
use ruff_formatter::write;
use ruff_python_ast::node::AstNode;
use ruff_python_ast::AstNode;
use ruff_python_ast::StmtImportFrom;
use ruff_text_size::Ranged;

View file

@ -1,5 +1,5 @@
use ruff_formatter::{format_args, write};
use ruff_python_ast::node::AstNode;
use ruff_python_ast::AstNode;
use ruff_python_ast::StmtNonlocal;
use crate::comments::{SourceComment, SuppressionKind};

View file

@ -1,5 +1,5 @@
use ruff_formatter::{format_args, write};
use ruff_python_ast::node::AstNode;
use ruff_python_ast::AstNode;
use ruff_python_ast::{Stmt, StmtWhile};
use ruff_text_size::Ranged;

View file

@ -1,5 +1,5 @@
use ruff_formatter::{format_args, write, FormatError};
use ruff_python_ast::node::AstNode;
use ruff_python_ast::AstNode;
use ruff_python_ast::StmtWith;
use ruff_python_trivia::{SimpleTokenKind, SimpleTokenizer};
use ruff_text_size::{Ranged, TextRange};

View file

@ -1,6 +1,6 @@
use ruff_formatter::{write, FormatOwnedWithRule, FormatRefWithRule, FormatRuleWithOptions};
use ruff_python_ast::helpers::is_compound_statement;
use ruff_python_ast::node::AnyNodeRef;
use ruff_python_ast::AnyNodeRef;
use ruff_python_ast::{self as ast, Constant, Expr, ExprConstant, PySourceType, Stmt, Suite};
use ruff_python_trivia::{lines_after, lines_after_ignoring_end_of_line_trivia, lines_before};
use ruff_text_size::{Ranged, TextRange};