mirror of
https://github.com/astral-sh/ruff.git
synced 2025-08-04 02:38:25 +00:00
Pull in RustPython parser (#6099)
This commit is contained in:
parent
86539c1fc5
commit
40f54375cb
779 changed files with 108400 additions and 2078 deletions
|
@ -13,16 +13,16 @@ license = { workspace = true }
|
|||
[lib]
|
||||
|
||||
[dependencies]
|
||||
ruff_index = { path = "../ruff_index" }
|
||||
ruff_python_ast = { path = "../ruff_python_ast" }
|
||||
ruff_python_stdlib = { path = "../ruff_python_stdlib" }
|
||||
ruff_text_size = { workspace = true }
|
||||
ruff_source_file = { path = "../ruff_source_file" }
|
||||
ruff_index = { path = "../ruff_index" }
|
||||
ruff_text_size = { path = "../ruff_text_size" }
|
||||
|
||||
bitflags = { workspace = true }
|
||||
is-macro = { workspace = true }
|
||||
num-traits = { workspace = true }
|
||||
rustc-hash = { workspace = true }
|
||||
rustpython-parser = { workspace = true }
|
||||
rustpython-ast = { workspace = true }
|
||||
|
||||
|
||||
smallvec = { workspace = true }
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
use std::cmp::Ordering;
|
||||
use std::iter;
|
||||
|
||||
use rustpython_ast::{self as ast, ExceptHandler, Stmt};
|
||||
use ruff_python_ast::{self as ast, ExceptHandler, Stmt};
|
||||
|
||||
use crate::node::{NodeId, Nodes};
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
use rustpython_ast::Decorator;
|
||||
use ruff_python_ast::Decorator;
|
||||
|
||||
use ruff_python_ast::call_path::from_qualified_name;
|
||||
use ruff_python_ast::helpers::map_callable;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
use rustpython_ast::{self as ast, Expr, Keyword};
|
||||
use ruff_python_ast::{self as ast, Expr, Keyword};
|
||||
|
||||
use ruff_python_ast::call_path::{collect_call_path, from_qualified_name};
|
||||
use ruff_python_ast::helpers::{find_keyword, is_const_true};
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
//! Analysis rules to perform basic type inference on individual expressions.
|
||||
|
||||
use rustpython_ast::{Constant, Expr};
|
||||
use rustpython_parser::ast;
|
||||
use ruff_python_ast as ast;
|
||||
use ruff_python_ast::{Constant, Expr};
|
||||
|
||||
/// An extremely simple type inference system for individual expressions.
|
||||
///
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
//! Analysis rules for the `typing` module.
|
||||
|
||||
use num_traits::identities::Zero;
|
||||
use rustpython_ast::{self as ast, Constant, Expr, Operator};
|
||||
use ruff_python_ast::{self as ast, Constant, Expr, Operator};
|
||||
|
||||
use ruff_python_ast::call_path::{from_qualified_name, from_unqualified_name, CallPath};
|
||||
use ruff_python_ast::helpers::is_const_false;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
use std::path::Path;
|
||||
|
||||
use rustpython_ast::{self as ast, Decorator, Stmt};
|
||||
use ruff_python_ast::{self as ast, Decorator, Stmt};
|
||||
|
||||
use ruff_python_ast::call_path::{collect_call_path, CallPath};
|
||||
use ruff_python_ast::helpers::map_callable;
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
use std::ops::{Deref, DerefMut};
|
||||
|
||||
use bitflags::bitflags;
|
||||
use ruff_python_ast::Ranged;
|
||||
use ruff_text_size::TextRange;
|
||||
use rustpython_ast::Ranged;
|
||||
|
||||
use ruff_index::{newtype_index, IndexSlice, IndexVec};
|
||||
use ruff_source_file::Locator;
|
||||
|
|
|
@ -5,7 +5,7 @@ use std::fmt::Debug;
|
|||
use std::ops::Deref;
|
||||
|
||||
use ruff_index::{newtype_index, IndexSlice, IndexVec};
|
||||
use rustpython_ast::{self as ast, Stmt};
|
||||
use ruff_python_ast::{self as ast, Stmt};
|
||||
|
||||
use crate::analyze::visibility::{
|
||||
class_visibility, function_visibility, method_visibility, ModuleSource, Visibility,
|
||||
|
|
|
@ -4,10 +4,10 @@
|
|||
|
||||
use std::ops::Index;
|
||||
|
||||
use ruff_python_ast as ast;
|
||||
use ruff_python_ast::Stmt;
|
||||
use ruff_text_size::TextRange;
|
||||
use rustc_hash::FxHashMap;
|
||||
use rustpython_ast::Stmt;
|
||||
use rustpython_parser::ast;
|
||||
|
||||
use ruff_index::{newtype_index, IndexVec};
|
||||
use ruff_python_ast::statement_visitor::{walk_stmt, StatementVisitor};
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
use std::path::Path;
|
||||
|
||||
use bitflags::bitflags;
|
||||
use ruff_python_ast::{Expr, Ranged, Stmt};
|
||||
use ruff_text_size::TextRange;
|
||||
use rustc_hash::FxHashMap;
|
||||
use rustpython_ast::{Expr, Ranged, Stmt};
|
||||
use smallvec::SmallVec;
|
||||
|
||||
use ruff_python_ast::call_path::{collect_call_path, from_unqualified_name, CallPath};
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
use std::ops::{Index, IndexMut};
|
||||
|
||||
use ruff_index::{newtype_index, IndexVec};
|
||||
use ruff_python_ast::Stmt;
|
||||
use rustc_hash::FxHashMap;
|
||||
use rustpython_ast::Stmt;
|
||||
|
||||
use ruff_python_ast::types::RefEquality;
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
use std::ops::{Deref, DerefMut};
|
||||
|
||||
use bitflags::bitflags;
|
||||
use ruff_python_ast as ast;
|
||||
use rustc_hash::FxHashMap;
|
||||
use rustpython_parser::ast;
|
||||
|
||||
use ruff_index::{newtype_index, Idx, IndexSlice, IndexVec};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue