mirror of
https://github.com/astral-sh/ruff.git
synced 2025-08-19 01:50:38 +00:00
Move all module from the AST to the semantic crate (#11330)
This commit is contained in:
parent
8591adba11
commit
22639c5a2a
7 changed files with 9 additions and 8 deletions
|
@ -1,6 +1,7 @@
|
|||
use ruff_python_ast::{all::DunderAllName, str::raw_contents_range};
|
||||
use ruff_python_ast::str::raw_contents_range;
|
||||
use ruff_text_size::{Ranged, TextRange};
|
||||
|
||||
use ruff_python_semantic::all::DunderAllName;
|
||||
use ruff_python_semantic::{
|
||||
BindingKind, ContextualizedDefinition, Definition, Export, Member, MemberKind,
|
||||
};
|
||||
|
|
|
@ -38,7 +38,6 @@ use ruff_text_size::{Ranged, TextRange, TextSize};
|
|||
|
||||
use ruff_diagnostics::{Diagnostic, IsolationLevel};
|
||||
use ruff_notebook::{CellOffsets, NotebookIndex};
|
||||
use ruff_python_ast::all::{extract_all_names, DunderAllDefinition, DunderAllFlags};
|
||||
use ruff_python_ast::helpers::{
|
||||
collect_import_from_member, extract_handled_exceptions, is_docstring_stmt, to_module_path,
|
||||
};
|
||||
|
@ -50,6 +49,7 @@ use ruff_python_ast::{helpers, str, visitor, PySourceType};
|
|||
use ruff_python_codegen::{Generator, Stylist};
|
||||
use ruff_python_index::Indexer;
|
||||
use ruff_python_parser::typing::{parse_type_annotation, AnnotationKind};
|
||||
use ruff_python_semantic::all::{extract_all_names, DunderAllDefinition, DunderAllFlags};
|
||||
use ruff_python_semantic::analyze::{imports, typing};
|
||||
use ruff_python_semantic::{
|
||||
BindingFlags, BindingId, BindingKind, Exceptions, Export, FromImport, Globals, Import, Module,
|
||||
|
|
|
@ -5,7 +5,6 @@ pub use int::*;
|
|||
pub use node::{AnyNode, AnyNodeRef, AstNode, NodeKind};
|
||||
pub use nodes::*;
|
||||
|
||||
pub mod all;
|
||||
pub mod comparable;
|
||||
pub mod docstrings;
|
||||
mod expression;
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
use bitflags::bitflags;
|
||||
use ruff_text_size::{Ranged, TextRange};
|
||||
|
||||
use crate::helpers::map_subscript;
|
||||
use crate::{self as ast, Expr, Stmt};
|
||||
use ruff_python_ast::{self as ast, helpers::map_subscript, Expr, Stmt};
|
||||
use ruff_text_size::{Ranged, TextRange};
|
||||
|
||||
bitflags! {
|
||||
#[derive(Default, Debug, Copy, Clone, PartialEq, Eq)]
|
|
@ -3,8 +3,8 @@ use std::ops::{Deref, DerefMut};
|
|||
|
||||
use bitflags::bitflags;
|
||||
|
||||
use crate::all::DunderAllName;
|
||||
use ruff_index::{newtype_index, IndexSlice, IndexVec};
|
||||
use ruff_python_ast::all::DunderAllName;
|
||||
use ruff_python_ast::name::QualifiedName;
|
||||
use ruff_python_ast::Stmt;
|
||||
use ruff_source_file::Locator;
|
||||
|
|
|
@ -5,8 +5,9 @@ use std::fmt::Debug;
|
|||
use std::ops::Deref;
|
||||
use std::path::Path;
|
||||
|
||||
use crate::all::DunderAllName;
|
||||
use ruff_index::{newtype_index, IndexSlice, IndexVec};
|
||||
use ruff_python_ast::{self as ast, all::DunderAllName, Stmt};
|
||||
use ruff_python_ast::{self as ast, Stmt};
|
||||
use ruff_text_size::{Ranged, TextRange};
|
||||
|
||||
use crate::analyze::visibility::{
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
pub mod all;
|
||||
pub mod analyze;
|
||||
mod binding;
|
||||
mod branches;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue