Pull in RustPython parser (#6099)

This commit is contained in:
Micha Reiser 2023-07-27 11:29:11 +02:00 committed by GitHub
parent 86539c1fc5
commit 40f54375cb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
779 changed files with 108400 additions and 2078 deletions

View file

@ -122,9 +122,9 @@ At time of writing, the repository includes the following crates:
intermediate representation. The backend for `ruff_python_formatter`. intermediate representation. The backend for `ruff_python_formatter`.
- `crates/ruff_index`: library crate inspired by `rustc_index`. - `crates/ruff_index`: library crate inspired by `rustc_index`.
- `crates/ruff_macros`: proc macro crate containing macros used by Ruff. - `crates/ruff_macros`: proc macro crate containing macros used by Ruff.
- `crates/ruff_python_ast`: library crate containing Python-specific AST types and utilities. Note - `crates/ruff_python_ast`: library crate containing Python-specific AST types and utilities.
that the AST schema itself is defined in the - `crates/ruff_python_codegen`: library crate containing utilities for generating Python source code.
[rustpython-ast](https://github.com/astral-sh/RustPython-Parser) crate. - `crates/ruff_python_codegen`: library crate containing utilities for generating Python source code.
- `crates/ruff_python_formatter`: library crate implementing the Python formatter. Emits an - `crates/ruff_python_formatter`: library crate implementing the Python formatter. Emits an
intermediate representation for each node, which `ruff_formatter` prints based on the configured intermediate representation for each node, which `ruff_formatter` prints based on the configured
line length. line length.
@ -135,8 +135,7 @@ At time of writing, the repository includes the following crates:
the names of all built-in exceptions and which standard library types are immutable. the names of all built-in exceptions and which standard library types are immutable.
- `crates/ruff_python_trivia`: library crate containing Python-specific trivia utilities (e.g., - `crates/ruff_python_trivia`: library crate containing Python-specific trivia utilities (e.g.,
for analyzing indentation, newlines, etc.). for analyzing indentation, newlines, etc.).
- `crates/ruff_rustpython`: library crate containing `RustPython`-specific utilities. - `crates/ruff_python_parser`: library crate containing the Python parser.
- `crates/ruff_textwrap`: library crate to indent and dedent Python source code.
- `crates/ruff_wasm`: library crate for exposing Ruff as a WebAssembly module. Powers the - `crates/ruff_wasm`: library crate for exposing Ruff as a WebAssembly module. Powers the
[Ruff Playground](https://play.ruff.rs/). [Ruff Playground](https://play.ruff.rs/).

346
Cargo.lock generated
View file

@ -133,6 +133,15 @@ dependencies = [
"os_str_bytes", "os_str_bytes",
] ]
[[package]]
name = "ascii-canvas"
version = "3.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8824ecca2e851cec16968d54a01dd372ef8f95b244fb84b84e70128be347c3c6"
dependencies = [
"term",
]
[[package]] [[package]]
name = "assert_cmd" name = "assert_cmd"
version = "2.0.11" version = "2.0.11"
@ -169,6 +178,21 @@ dependencies = [
"serde", "serde",
] ]
[[package]]
name = "bit-set"
version = "0.5.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0700ddab506f33b20a03b13996eccd309a48e5ff77d0d95926aa0210fb4e95f1"
dependencies = [
"bit-vec",
]
[[package]]
name = "bit-vec"
version = "0.6.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb"
[[package]] [[package]]
name = "bitflags" name = "bitflags"
version = "1.3.2" version = "1.3.2"
@ -609,6 +633,16 @@ dependencies = [
"dirs-sys 0.4.1", "dirs-sys 0.4.1",
] ]
[[package]]
name = "dirs-next"
version = "2.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b98cf8ebf19c3d1b223e151f99a4f9f0690dca41414773390fc824184ac833e1"
dependencies = [
"cfg-if",
"dirs-sys-next",
]
[[package]] [[package]]
name = "dirs-sys" name = "dirs-sys"
version = "0.3.7" version = "0.3.7"
@ -632,6 +666,17 @@ dependencies = [
"windows-sys 0.48.0", "windows-sys 0.48.0",
] ]
[[package]]
name = "dirs-sys-next"
version = "0.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4ebda144c4fe02d1f7ea1a7d9641b6fc6b580adcfa024ae48797ecdeb6825b4d"
dependencies = [
"libc",
"redox_users",
"winapi",
]
[[package]] [[package]]
name = "doc-comment" name = "doc-comment"
version = "0.3.3" version = "0.3.3"
@ -656,6 +701,15 @@ version = "1.8.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7fcaabb2fef8c910e7f4c7ce9f67a1283a1715879a7c230ca9d6d1ae31f16d91" checksum = "7fcaabb2fef8c910e7f4c7ce9f67a1283a1715879a7c230ca9d6d1ae31f16d91"
[[package]]
name = "ena"
version = "0.14.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c533630cf40e9caa44bd91aadc88a75d75a4c3a12b4cfde353cbed41daa1e1f1"
dependencies = [
"log",
]
[[package]] [[package]]
name = "encode_unicode" name = "encode_unicode"
version = "0.3.6" version = "0.3.6"
@ -732,6 +786,12 @@ dependencies = [
"windows-sys 0.48.0", "windows-sys 0.48.0",
] ]
[[package]]
name = "fixedbitset"
version = "0.4.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80"
[[package]] [[package]]
name = "flake8-to-ruff" name = "flake8-to-ruff"
version = "0.0.280" version = "0.0.280"
@ -1099,6 +1159,28 @@ dependencies = [
"libc", "libc",
] ]
[[package]]
name = "lalrpop"
version = "0.20.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "da4081d44f4611b66c6dd725e6de3169f9f63905421e8626fcb86b6a898998b8"
dependencies = [
"ascii-canvas",
"bit-set",
"diff",
"ena",
"is-terminal",
"itertools",
"lalrpop-util",
"petgraph",
"regex",
"regex-syntax 0.7.3",
"string_cache",
"term",
"tiny-keccak",
"unicode-xid",
]
[[package]] [[package]]
name = "lalrpop-util" name = "lalrpop-util"
version = "0.20.0" version = "0.20.0"
@ -1199,6 +1281,16 @@ version = "0.4.3"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "09fc20d2ca12cb9f044c93e3bd6d32d523e6e2ec3db4f7b2939cd99026ecd3f0" checksum = "09fc20d2ca12cb9f044c93e3bd6d32d523e6e2ec3db4f7b2939cd99026ecd3f0"
[[package]]
name = "lock_api"
version = "0.4.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c1cc9717a20b1bb222f333e6a92fd32f7d8a18ddc5a3191a11af45dcbf4dcd16"
dependencies = [
"autocfg",
"scopeguard",
]
[[package]] [[package]]
name = "log" name = "log"
version = "0.4.19" version = "0.4.19"
@ -1277,6 +1369,12 @@ version = "1.0.9"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "308d96db8debc727c3fd9744aac51751243420e46edf401010908da7f8d5e57c" checksum = "308d96db8debc727c3fd9744aac51751243420e46edf401010908da7f8d5e57c"
[[package]]
name = "new_debug_unreachable"
version = "1.0.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e4a24736216ec316047a1fc4252e27dabb04218aa4a3f37c6e7ddbf1f9782b54"
[[package]] [[package]]
name = "nextest-workspace-hack" name = "nextest-workspace-hack"
version = "0.1.0" version = "0.1.0"
@ -1421,6 +1519,29 @@ version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39"
[[package]]
name = "parking_lot"
version = "0.12.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f"
dependencies = [
"lock_api",
"parking_lot_core",
]
[[package]]
name = "parking_lot_core"
version = "0.9.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "93f00c865fe7cabf650081affecd3871070f26767e7b2070a3ffae14c654b447"
dependencies = [
"cfg-if",
"libc",
"redox_syscall 0.3.5",
"smallvec",
"windows-targets 0.48.1",
]
[[package]] [[package]]
name = "paste" name = "paste"
version = "1.0.13" version = "1.0.13"
@ -1512,13 +1633,23 @@ version = "2.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9b2a4787296e9989611394c33f193f676704af1686e70b8f8033ab5ba9a35a94" checksum = "9b2a4787296e9989611394c33f193f676704af1686e70b8f8033ab5ba9a35a94"
[[package]]
name = "petgraph"
version = "0.6.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4dd7d28ee937e54fe3080c91faa1c3a46c06de6252988a7f4592ba2310ef22a4"
dependencies = [
"fixedbitset",
"indexmap 1.9.3",
]
[[package]] [[package]]
name = "phf" name = "phf"
version = "0.11.2" version = "0.11.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ade2d8b8f33c7333b51bcf0428d37e217e9f32192ae4772156f65063b8ce03dc" checksum = "ade2d8b8f33c7333b51bcf0428d37e217e9f32192ae4772156f65063b8ce03dc"
dependencies = [ dependencies = [
"phf_shared", "phf_shared 0.11.2",
] ]
[[package]] [[package]]
@ -1528,7 +1659,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e8d39688d359e6b34654d328e262234662d16cc0f60ec8dcbe5e718709342a5a" checksum = "e8d39688d359e6b34654d328e262234662d16cc0f60ec8dcbe5e718709342a5a"
dependencies = [ dependencies = [
"phf_generator", "phf_generator",
"phf_shared", "phf_shared 0.11.2",
] ]
[[package]] [[package]]
@ -1537,10 +1668,19 @@ version = "0.11.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "48e4cc64c2ad9ebe670cb8fd69dd50ae301650392e81c05f9bfcb2d5bdbc24b0" checksum = "48e4cc64c2ad9ebe670cb8fd69dd50ae301650392e81c05f9bfcb2d5bdbc24b0"
dependencies = [ dependencies = [
"phf_shared", "phf_shared 0.11.2",
"rand", "rand",
] ]
[[package]]
name = "phf_shared"
version = "0.10.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b6796ad771acdc0123d2a88dc428b5e38ef24456743ddb1744ed628f9815c096"
dependencies = [
"siphasher",
]
[[package]] [[package]]
name = "phf_shared" name = "phf_shared"
version = "0.11.2" version = "0.11.2"
@ -1601,6 +1741,18 @@ version = "1.3.3"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "767eb9f07d4a5ebcb39bbf2d452058a93c011373abf6832e24194a1c3f004794" checksum = "767eb9f07d4a5ebcb39bbf2d452058a93c011373abf6832e24194a1c3f004794"
[[package]]
name = "ppv-lite86"
version = "0.2.17"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de"
[[package]]
name = "precomputed-hash"
version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c"
[[package]] [[package]]
name = "predicates" name = "predicates"
version = "3.0.3" version = "3.0.3"
@ -1725,6 +1877,18 @@ version = "0.8.5"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404"
dependencies = [ dependencies = [
"libc",
"rand_chacha",
"rand_core",
]
[[package]]
name = "rand_chacha"
version = "0.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88"
dependencies = [
"ppv-lite86",
"rand_core", "rand_core",
] ]
@ -1733,6 +1897,9 @@ name = "rand_core"
version = "0.6.4" version = "0.6.4"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c"
dependencies = [
"getrandom",
]
[[package]] [[package]]
name = "rayon" name = "rayon"
@ -1907,6 +2074,7 @@ dependencies = [
"ruff_python_ast", "ruff_python_ast",
"ruff_python_codegen", "ruff_python_codegen",
"ruff_python_index", "ruff_python_index",
"ruff_python_literal",
"ruff_python_parser", "ruff_python_parser",
"ruff_python_semantic", "ruff_python_semantic",
"ruff_python_stdlib", "ruff_python_stdlib",
@ -1914,9 +2082,6 @@ dependencies = [
"ruff_source_file", "ruff_source_file",
"ruff_text_size", "ruff_text_size",
"rustc-hash", "rustc-hash",
"rustpython-ast",
"rustpython-format",
"rustpython-parser",
"schemars", "schemars",
"semver", "semver",
"serde", "serde",
@ -1947,8 +2112,7 @@ dependencies = [
"ruff", "ruff",
"ruff_python_ast", "ruff_python_ast",
"ruff_python_formatter", "ruff_python_formatter",
"rustpython-ast", "ruff_python_parser",
"rustpython-parser",
"serde", "serde",
"serde_json", "serde_json",
"tikv-jemallocator", "tikv-jemallocator",
@ -2039,13 +2203,13 @@ dependencies = [
"ruff_cli", "ruff_cli",
"ruff_diagnostics", "ruff_diagnostics",
"ruff_formatter", "ruff_formatter",
"ruff_python_ast",
"ruff_python_codegen", "ruff_python_codegen",
"ruff_python_formatter", "ruff_python_formatter",
"ruff_python_literal",
"ruff_python_parser",
"ruff_python_stdlib", "ruff_python_stdlib",
"ruff_python_trivia", "ruff_python_trivia",
"rustpython-ast",
"rustpython-format",
"rustpython-parser",
"schemars", "schemars",
"serde", "serde",
"serde_json", "serde_json",
@ -2111,12 +2275,11 @@ dependencies = [
"num-bigint", "num-bigint",
"num-traits", "num-traits",
"once_cell", "once_cell",
"ruff_python_parser",
"ruff_python_trivia", "ruff_python_trivia",
"ruff_source_file", "ruff_source_file",
"ruff_text_size", "ruff_text_size",
"rustc-hash", "rustc-hash",
"rustpython-ast",
"rustpython-parser",
"serde", "serde",
"smallvec", "smallvec",
] ]
@ -2127,10 +2290,9 @@ version = "0.0.0"
dependencies = [ dependencies = [
"once_cell", "once_cell",
"ruff_python_ast", "ruff_python_ast",
"ruff_python_literal",
"ruff_python_parser",
"ruff_source_file", "ruff_source_file",
"rustpython-ast",
"rustpython-literal",
"rustpython-parser",
] ]
[[package]] [[package]]
@ -2148,12 +2310,11 @@ dependencies = [
"ruff_formatter", "ruff_formatter",
"ruff_python_ast", "ruff_python_ast",
"ruff_python_index", "ruff_python_index",
"ruff_python_parser",
"ruff_python_trivia", "ruff_python_trivia",
"ruff_source_file", "ruff_source_file",
"ruff_text_size", "ruff_text_size",
"rustc-hash", "rustc-hash",
"rustpython-ast",
"rustpython-parser",
"serde", "serde",
"serde_json", "serde_json",
"similar", "similar",
@ -2166,11 +2327,26 @@ name = "ruff_python_index"
version = "0.0.0" version = "0.0.0"
dependencies = [ dependencies = [
"itertools", "itertools",
"ruff_python_ast",
"ruff_python_parser",
"ruff_python_trivia", "ruff_python_trivia",
"ruff_source_file", "ruff_source_file",
"ruff_text_size", "ruff_text_size",
"rustpython-ast", ]
"rustpython-parser",
[[package]]
name = "ruff_python_literal"
version = "0.0.0"
dependencies = [
"bitflags 2.3.3",
"hexf-parse",
"is-macro",
"itertools",
"lexical-parse-float",
"num-bigint",
"num-traits",
"rand",
"unic-ucd-category",
] ]
[[package]] [[package]]
@ -2178,11 +2354,21 @@ name = "ruff_python_parser"
version = "0.0.0" version = "0.0.0"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"insta",
"is-macro", "is-macro",
"itertools",
"lalrpop",
"lalrpop-util",
"num-bigint",
"num-traits",
"ruff_python_ast", "ruff_python_ast",
"ruff_text_size", "ruff_text_size",
"rustpython-ast", "rustc-hash",
"rustpython-parser", "static_assertions",
"tiny-keccak",
"unic-emoji-char",
"unic-ucd-ident",
"unicode_names2",
] ]
[[package]] [[package]]
@ -2208,8 +2394,6 @@ dependencies = [
"ruff_source_file", "ruff_source_file",
"ruff_text_size", "ruff_text_size",
"rustc-hash", "rustc-hash",
"rustpython-ast",
"rustpython-parser",
"smallvec", "smallvec",
] ]
@ -2223,10 +2407,10 @@ version = "0.0.0"
dependencies = [ dependencies = [
"insta", "insta",
"memchr", "memchr",
"ruff_python_ast",
"ruff_python_parser",
"ruff_source_file", "ruff_source_file",
"ruff_text_size", "ruff_text_size",
"rustpython-ast",
"rustpython-parser",
"smallvec", "smallvec",
"unic-ucd-ident", "unic-ucd-ident",
] ]
@ -2241,7 +2425,7 @@ dependencies = [
"regex", "regex",
"ruff_python_ast", "ruff_python_ast",
"ruff_python_parser", "ruff_python_parser",
"rustpython-ast", "ruff_text_size",
"shlex", "shlex",
"tracing", "tracing",
"tracing-subscriber", "tracing-subscriber",
@ -2261,10 +2445,11 @@ dependencies = [
[[package]] [[package]]
name = "ruff_text_size" name = "ruff_text_size"
version = "0.0.0" version = "0.0.0"
source = "git+https://github.com/astral-sh/RustPython-Parser.git?rev=593b46be5e0336fe01917f8ef400bd12d81df8c1#593b46be5e0336fe01917f8ef400bd12d81df8c1"
dependencies = [ dependencies = [
"schemars", "schemars",
"serde", "serde",
"serde_test",
"static_assertions",
] ]
[[package]] [[package]]
@ -2283,7 +2468,6 @@ dependencies = [
"ruff_python_index", "ruff_python_index",
"ruff_python_parser", "ruff_python_parser",
"ruff_source_file", "ruff_source_file",
"rustpython-parser",
"serde", "serde",
"serde-wasm-bindgen", "serde-wasm-bindgen",
"wasm-bindgen", "wasm-bindgen",
@ -2355,71 +2539,6 @@ dependencies = [
"untrusted", "untrusted",
] ]
[[package]]
name = "rustpython-ast"
version = "0.2.0"
source = "git+https://github.com/astral-sh/RustPython-Parser.git?rev=593b46be5e0336fe01917f8ef400bd12d81df8c1#593b46be5e0336fe01917f8ef400bd12d81df8c1"
dependencies = [
"is-macro",
"num-bigint",
"rustpython-parser-core",
"static_assertions",
]
[[package]]
name = "rustpython-format"
version = "0.2.0"
source = "git+https://github.com/astral-sh/RustPython-Parser.git?rev=593b46be5e0336fe01917f8ef400bd12d81df8c1#593b46be5e0336fe01917f8ef400bd12d81df8c1"
dependencies = [
"bitflags 2.3.3",
"itertools",
"num-bigint",
"num-traits",
"rustpython-literal",
]
[[package]]
name = "rustpython-literal"
version = "0.2.0"
source = "git+https://github.com/astral-sh/RustPython-Parser.git?rev=593b46be5e0336fe01917f8ef400bd12d81df8c1#593b46be5e0336fe01917f8ef400bd12d81df8c1"
dependencies = [
"hexf-parse",
"is-macro",
"lexical-parse-float",
"num-traits",
"unic-ucd-category",
]
[[package]]
name = "rustpython-parser"
version = "0.2.0"
source = "git+https://github.com/astral-sh/RustPython-Parser.git?rev=593b46be5e0336fe01917f8ef400bd12d81df8c1#593b46be5e0336fe01917f8ef400bd12d81df8c1"
dependencies = [
"anyhow",
"is-macro",
"itertools",
"lalrpop-util",
"num-bigint",
"num-traits",
"rustc-hash",
"rustpython-ast",
"rustpython-parser-core",
"static_assertions",
"tiny-keccak",
"unic-emoji-char",
"unic-ucd-ident",
"unicode_names2",
]
[[package]]
name = "rustpython-parser-core"
version = "0.2.0"
source = "git+https://github.com/astral-sh/RustPython-Parser.git?rev=593b46be5e0336fe01917f8ef400bd12d81df8c1#593b46be5e0336fe01917f8ef400bd12d81df8c1"
dependencies = [
"is-macro",
"ruff_text_size",
]
[[package]] [[package]]
name = "rustversion" name = "rustversion"
version = "1.0.13" version = "1.0.13"
@ -2555,6 +2674,15 @@ dependencies = [
"serde", "serde",
] ]
[[package]]
name = "serde_test"
version = "1.0.176"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5a2f49ace1498612d14f7e0b8245519584db8299541dfe31a06374a828d620ab"
dependencies = [
"serde",
]
[[package]] [[package]]
name = "serde_with" name = "serde_with"
version = "3.0.0" version = "3.0.0"
@ -2637,6 +2765,19 @@ version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f"
[[package]]
name = "string_cache"
version = "0.8.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f91138e76242f575eb1d3b38b4f1362f10d3a43f47d182a5b359af488a02293b"
dependencies = [
"new_debug_unreachable",
"once_cell",
"parking_lot",
"phf_shared 0.10.0",
"precomputed-hash",
]
[[package]] [[package]]
name = "strsim" name = "strsim"
version = "0.10.0" version = "0.10.0"
@ -2710,6 +2851,17 @@ dependencies = [
"windows-sys 0.48.0", "windows-sys 0.48.0",
] ]
[[package]]
name = "term"
version = "0.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c59df8ac95d96ff9bede18eb7300b0fda5e5d8d90960e76f8e14ae765eedbf1f"
dependencies = [
"dirs-next",
"rustversion",
"winapi",
]
[[package]] [[package]]
name = "termcolor" name = "termcolor"
version = "1.2.0" version = "1.2.0"
@ -3089,6 +3241,12 @@ version = "0.1.10"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c0edd1e5b14653f783770bce4a4dabb4a5108a5370a5f5d8cfe8710c361f6c8b" checksum = "c0edd1e5b14653f783770bce4a4dabb4a5108a5370a5f5d8cfe8710c361f6c8b"
[[package]]
name = "unicode-xid"
version = "0.2.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c"
[[package]] [[package]]
name = "unicode_names2" name = "unicode_names2"
version = "0.6.0" version = "0.6.0"

View file

@ -51,12 +51,6 @@ wsl = { version = "0.1.0" }
# v1.0.1 # v1.0.1
libcst = { git = "https://github.com/Instagram/LibCST.git", rev = "3cacca1a1029f05707e50703b49fe3dd860aa839", default-features = false } libcst = { git = "https://github.com/Instagram/LibCST.git", rev = "3cacca1a1029f05707e50703b49fe3dd860aa839", default-features = false }
ruff_text_size = { git = "https://github.com/astral-sh/RustPython-Parser.git", rev = "593b46be5e0336fe01917f8ef400bd12d81df8c1" }
rustpython-ast = { git = "https://github.com/astral-sh/RustPython-Parser.git", rev = "593b46be5e0336fe01917f8ef400bd12d81df8c1" }
rustpython-format = { git = "https://github.com/astral-sh/RustPython-Parser.git", rev = "593b46be5e0336fe01917f8ef400bd12d81df8c1" }
rustpython-literal = { git = "https://github.com/astral-sh/RustPython-Parser.git", rev = "593b46be5e0336fe01917f8ef400bd12d81df8c1" }
rustpython-parser = { git = "https://github.com/astral-sh/RustPython-Parser.git", rev = "593b46be5e0336fe01917f8ef400bd12d81df8c1" }
[profile.release] [profile.release]
lto = "fat" lto = "fat"
codegen-units = 1 codegen-units = 1
@ -69,7 +63,7 @@ opt-level = 3
# Reduce complexity of a parser function that would trigger a locals limit in a wasm tool. # Reduce complexity of a parser function that would trigger a locals limit in a wasm tool.
# https://github.com/bytecodealliance/wasm-tools/blob/b5c3d98e40590512a3b12470ef358d5c7b983b15/crates/wasmparser/src/limits.rs#L29 # https://github.com/bytecodealliance/wasm-tools/blob/b5c3d98e40590512a3b12470ef358d5c7b983b15/crates/wasmparser/src/limits.rs#L29
[profile.dev.package.rustpython-parser] [profile.dev.package.ruff_python_parser]
opt-level = 1 opt-level = 1
# Use the `--profile release-debug` flag to show symbols in release mode. # Use the `--profile release-debug` flag to show symbols in release mode.

View file

@ -22,12 +22,13 @@ ruff_macros = { path = "../ruff_macros" }
ruff_python_ast = { path = "../ruff_python_ast", features = ["serde"] } ruff_python_ast = { path = "../ruff_python_ast", features = ["serde"] }
ruff_python_codegen = { path = "../ruff_python_codegen" } ruff_python_codegen = { path = "../ruff_python_codegen" }
ruff_python_index = { path = "../ruff_python_index" } ruff_python_index = { path = "../ruff_python_index" }
ruff_python_literal = { path = "../ruff_python_literal" }
ruff_python_semantic = { path = "../ruff_python_semantic" } ruff_python_semantic = { path = "../ruff_python_semantic" }
ruff_python_stdlib = { path = "../ruff_python_stdlib" } ruff_python_stdlib = { path = "../ruff_python_stdlib" }
ruff_python_trivia = { path = "../ruff_python_trivia" } ruff_python_trivia = { path = "../ruff_python_trivia" }
ruff_python_parser = { path = "../ruff_python_parser" } ruff_python_parser = { path = "../ruff_python_parser" }
ruff_source_file = { path = "../ruff_source_file", features = ["serde"] } ruff_source_file = { path = "../ruff_source_file", features = ["serde"] }
ruff_text_size = { workspace = true } ruff_text_size = { path = "../ruff_text_size" }
annotate-snippets = { version = "0.9.1", features = ["color"] } annotate-snippets = { version = "0.9.1", features = ["color"] }
anyhow = { workspace = true } anyhow = { workspace = true }
@ -61,9 +62,8 @@ quick-junit = { version = "0.3.2" }
regex = { workspace = true } regex = { workspace = true }
result-like = { version = "0.4.6" } result-like = { version = "0.4.6" }
rustc-hash = { workspace = true } rustc-hash = { workspace = true }
rustpython-format = { workspace = true }
rustpython-parser = { workspace = true }
rustpython-ast = { workspace = true }
schemars = { workspace = true, optional = true } schemars = { workspace = true, optional = true }
semver = { version = "1.0.16" } semver = { version = "1.0.16" }
serde = { workspace = true } serde = { workspace = true }

View file

@ -4,7 +4,7 @@ use anyhow::{bail, Result};
use libcst_native::{ use libcst_native::{
Codegen, CodegenState, ImportNames, ParenthesizableWhitespace, SmallStatement, Statement, Codegen, CodegenState, ImportNames, ParenthesizableWhitespace, SmallStatement, Statement,
}; };
use rustpython_ast::{Ranged, Stmt}; use ruff_python_ast::{Ranged, Stmt};
use ruff_python_codegen::Stylist; use ruff_python_codegen::Stylist;
use ruff_source_file::Locator; use ruff_source_file::Locator;

View file

@ -1,8 +1,8 @@
//! Interface for generating autofix edits from higher-level actions (e.g., "remove an argument"). //! Interface for generating autofix edits from higher-level actions (e.g., "remove an argument").
use anyhow::{bail, Result}; use anyhow::{bail, Result};
use ruff_python_ast::{self as ast, ExceptHandler, Expr, Keyword, Ranged, Stmt};
use ruff_python_parser::{lexer, Mode};
use ruff_text_size::{TextLen, TextRange, TextSize}; use ruff_text_size::{TextLen, TextRange, TextSize};
use rustpython_ast::{self as ast, ExceptHandler, Expr, Keyword, Ranged, Stmt};
use rustpython_parser::{lexer, Mode};
use ruff_diagnostics::Edit; use ruff_diagnostics::Edit;
use ruff_python_codegen::Stylist; use ruff_python_codegen::Stylist;
@ -294,9 +294,9 @@ fn next_stmt_break(semicolon: TextSize, locator: &Locator) -> TextSize {
#[cfg(test)] #[cfg(test)]
mod tests { mod tests {
use anyhow::Result; use anyhow::Result;
use ruff_python_ast::{Ranged, Suite};
use ruff_python_parser::Parse;
use ruff_text_size::TextSize; use ruff_text_size::TextSize;
use rustpython_ast::{Ranged, Suite};
use rustpython_parser::Parse;
use ruff_source_file::Locator; use ruff_source_file::Locator;

View file

@ -1,4 +1,4 @@
use rustpython_ast::{Arg, Ranged}; use ruff_python_ast::{Arg, Ranged};
use crate::checkers::ast::Checker; use crate::checkers::ast::Checker;
use crate::codes::Rule; use crate::codes::Rule;

View file

@ -1,4 +1,4 @@
use rustpython_ast::Arguments; use ruff_python_ast::Arguments;
use crate::checkers::ast::Checker; use crate::checkers::ast::Checker;
use crate::codes::Rule; use crate::codes::Rule;

View file

@ -1,4 +1,4 @@
use rustpython_ast::Comprehension; use ruff_python_ast::Comprehension;
use crate::checkers::ast::Checker; use crate::checkers::ast::Checker;
use crate::codes::Rule; use crate::codes::Rule;

View file

@ -1,4 +1,4 @@
use rustpython_ast::{self as ast, Stmt}; use ruff_python_ast::{self as ast, Stmt};
use crate::checkers::ast::Checker; use crate::checkers::ast::Checker;
use crate::codes::Rule; use crate::codes::Rule;

View file

@ -1,6 +1,6 @@
use ruff_python_ast::str::raw_contents_range; use ruff_python_ast::str::raw_contents_range;
use ruff_python_ast::Ranged;
use ruff_text_size::TextRange; use ruff_text_size::TextRange;
use rustpython_ast::Ranged;
use ruff_python_semantic::{BindingKind, ContextualizedDefinition, Export}; use ruff_python_semantic::{BindingKind, ContextualizedDefinition, Export};

View file

@ -1,4 +1,4 @@
use rustpython_ast::{self as ast, ExceptHandler, Ranged}; use ruff_python_ast::{self as ast, ExceptHandler, Ranged};
use crate::checkers::ast::Checker; use crate::checkers::ast::Checker;
use crate::registry::Rule; use crate::registry::Rule;

View file

@ -1,5 +1,5 @@
use rustpython_ast::{self as ast, Constant, Expr, ExprContext, Operator, Ranged}; use ruff_python_ast::{self as ast, Constant, Expr, ExprContext, Operator, Ranged};
use rustpython_format::cformat::{CFormatError, CFormatErrorType}; use ruff_python_literal::cformat::{CFormatError, CFormatErrorType};
use ruff_diagnostics::Diagnostic; use ruff_diagnostics::Diagnostic;

View file

@ -1,4 +1,4 @@
use rustpython_ast::Suite; use ruff_python_ast::Suite;
use crate::checkers::ast::Checker; use crate::checkers::ast::Checker;
use crate::codes::Rule; use crate::codes::Rule;

View file

@ -1,4 +1,4 @@
use rustpython_ast::{self as ast, Expr, Ranged, Stmt}; use ruff_python_ast::{self as ast, Expr, Ranged, Stmt};
use ruff_diagnostics::Diagnostic; use ruff_diagnostics::Diagnostic;
use ruff_python_ast::helpers; use ruff_python_ast::helpers;

View file

@ -1,4 +1,4 @@
use rustpython_ast::Stmt; use ruff_python_ast::Stmt;
use crate::checkers::ast::Checker; use crate::checkers::ast::Checker;
use crate::codes::Rule; use crate::codes::Rule;

View file

@ -1,5 +1,5 @@
use ruff_python_ast::Expr;
use ruff_text_size::TextRange; use ruff_text_size::TextRange;
use rustpython_ast::Expr;
use ruff_python_semantic::{ScopeId, Snapshot}; use ruff_python_semantic::{ScopeId, Snapshot};

View file

@ -30,11 +30,11 @@ use std::path::Path;
use itertools::Itertools; use itertools::Itertools;
use log::error; use log::error;
use ruff_text_size::{TextRange, TextSize}; use ruff_python_ast::{
use rustpython_ast::{
self as ast, Arg, ArgWithDefault, Arguments, Comprehension, Constant, ElifElseClause, self as ast, Arg, ArgWithDefault, Arguments, Comprehension, Constant, ElifElseClause,
ExceptHandler, Expr, ExprContext, Keyword, Pattern, Ranged, Stmt, Suite, UnaryOp, ExceptHandler, Expr, ExprContext, Keyword, Pattern, Ranged, Stmt, Suite, UnaryOp,
}; };
use ruff_text_size::{TextRange, TextSize};
use ruff_diagnostics::{Diagnostic, IsolationLevel}; use ruff_diagnostics::{Diagnostic, IsolationLevel};
use ruff_python_ast::all::{extract_all_names, DunderAllFlags}; use ruff_python_ast::all::{extract_all_names, DunderAllFlags};

View file

@ -2,7 +2,7 @@
use std::borrow::Cow; use std::borrow::Cow;
use std::path::Path; use std::path::Path;
use rustpython_ast::{self as ast, Ranged, Stmt, Suite}; use ruff_python_ast::{self as ast, Ranged, Stmt, Suite};
use ruff_diagnostics::Diagnostic; use ruff_diagnostics::Diagnostic;
use ruff_python_ast::helpers::to_module_path; use ruff_python_ast::helpers::to_module_path;

View file

@ -1,9 +1,9 @@
use ruff_python_parser::lexer::LexResult;
use ruff_text_size::TextRange; use ruff_text_size::TextRange;
use rustpython_parser::lexer::LexResult;
use ruff_diagnostics::{Diagnostic, DiagnosticKind}; use ruff_diagnostics::{Diagnostic, DiagnosticKind};
use ruff_python_codegen::Stylist; use ruff_python_codegen::Stylist;
use ruff_python_parser::token_kind::TokenKind; use ruff_python_parser::TokenKind;
use ruff_source_file::Locator; use ruff_source_file::Locator;
use crate::registry::{AsRule, Rule}; use crate::registry::{AsRule, Rule};

View file

@ -3,8 +3,8 @@
use std::path::Path; use std::path::Path;
use itertools::Itertools; use itertools::Itertools;
use ruff_python_ast::Ranged;
use ruff_text_size::{TextLen, TextRange, TextSize}; use ruff_text_size::{TextLen, TextRange, TextSize};
use rustpython_ast::Ranged;
use ruff_diagnostics::{Diagnostic, Edit, Fix}; use ruff_diagnostics::{Diagnostic, Edit, Fix};
use ruff_source_file::Locator; use ruff_source_file::Locator;

View file

@ -99,8 +99,8 @@ pub(crate) fn check_physical_lines(
#[cfg(test)] #[cfg(test)]
mod tests { mod tests {
use rustpython_parser::lexer::lex; use ruff_python_parser::lexer::lex;
use rustpython_parser::Mode; use ruff_python_parser::Mode;
use ruff_python_codegen::Stylist; use ruff_python_codegen::Stylist;
use ruff_python_index::Indexer; use ruff_python_index::Indexer;

View file

@ -2,8 +2,8 @@
use std::path::Path; use std::path::Path;
use rustpython_parser::lexer::LexResult; use ruff_python_parser::lexer::LexResult;
use rustpython_parser::Tok; use ruff_python_parser::Tok;
use ruff_diagnostics::Diagnostic; use ruff_diagnostics::Diagnostic;
use ruff_python_index::Indexer; use ruff_python_index::Indexer;

View file

@ -3,9 +3,9 @@
use std::str::FromStr; use std::str::FromStr;
use bitflags::bitflags; use bitflags::bitflags;
use ruff_python_parser::lexer::LexResult;
use ruff_python_parser::Tok;
use ruff_text_size::{TextLen, TextRange, TextSize}; use ruff_text_size::{TextLen, TextRange, TextSize};
use rustpython_parser::lexer::LexResult;
use rustpython_parser::Tok;
use ruff_python_index::Indexer; use ruff_python_index::Indexer;
use ruff_source_file::Locator; use ruff_source_file::Locator;
@ -349,9 +349,9 @@ impl TodoDirectiveKind {
#[cfg(test)] #[cfg(test)]
mod tests { mod tests {
use ruff_python_parser::lexer::LexResult;
use ruff_python_parser::{lexer, Mode};
use ruff_text_size::{TextLen, TextRange, TextSize}; use ruff_text_size::{TextLen, TextRange, TextSize};
use rustpython_parser::lexer::LexResult;
use rustpython_parser::{lexer, Mode};
use ruff_python_index::Indexer; use ruff_python_index::Indexer;
use ruff_source_file::Locator; use ruff_source_file::Locator;

View file

@ -3,10 +3,10 @@
use std::iter::FusedIterator; use std::iter::FusedIterator;
use ruff_python_ast::{self as ast, Constant, Expr, Ranged, Stmt, Suite};
use ruff_python_parser::lexer::LexResult;
use ruff_python_parser::Tok;
use ruff_text_size::TextSize; use ruff_text_size::TextSize;
use rustpython_ast::{self as ast, Constant, Expr, Ranged, Stmt, Suite};
use rustpython_parser::lexer::LexResult;
use rustpython_parser::Tok;
use ruff_python_ast::statement_visitor::{walk_stmt, StatementVisitor}; use ruff_python_ast::statement_visitor::{walk_stmt, StatementVisitor};
use ruff_source_file::{Locator, UniversalNewlineIterator}; use ruff_source_file::{Locator, UniversalNewlineIterator};

View file

@ -1,6 +1,6 @@
//! Extract docstrings from an AST. //! Extract docstrings from an AST.
use rustpython_ast::{self as ast, Constant, Expr, Stmt}; use ruff_python_ast::{self as ast, Constant, Expr, Stmt};
use ruff_python_semantic::{Definition, DefinitionId, Definitions, Member, MemberKind}; use ruff_python_semantic::{Definition, DefinitionId, Definitions, Member, MemberKind};

View file

@ -1,8 +1,8 @@
use std::fmt::{Debug, Formatter}; use std::fmt::{Debug, Formatter};
use std::ops::Deref; use std::ops::Deref;
use ruff_python_ast::{Expr, Ranged};
use ruff_text_size::{TextRange, TextSize}; use ruff_text_size::{TextRange, TextSize};
use rustpython_ast::{Expr, Ranged};
use ruff_python_semantic::Definition; use ruff_python_semantic::Definition;

View file

@ -1,9 +1,9 @@
//! Insert statements into Python code. //! Insert statements into Python code.
use std::ops::Add; use std::ops::Add;
use ruff_python_ast::{Ranged, Stmt};
use ruff_python_parser::{lexer, Mode, Tok};
use ruff_text_size::TextSize; use ruff_text_size::TextSize;
use rustpython_ast::{Ranged, Stmt};
use rustpython_parser::{lexer, Mode, Tok};
use ruff_diagnostics::Edit; use ruff_diagnostics::Edit;
use ruff_python_ast::helpers::is_docstring_stmt; use ruff_python_ast::helpers::is_docstring_stmt;
@ -299,10 +299,10 @@ fn match_leading_semicolon(s: &str) -> Option<TextSize> {
#[cfg(test)] #[cfg(test)]
mod tests { mod tests {
use anyhow::Result; use anyhow::Result;
use ruff_python_ast::Suite;
use ruff_python_parser::lexer::LexResult;
use ruff_python_parser::Parse;
use ruff_text_size::TextSize; use ruff_text_size::TextSize;
use rustpython_ast::Suite;
use rustpython_parser::lexer::LexResult;
use rustpython_parser::Parse;
use ruff_python_codegen::Stylist; use ruff_python_codegen::Stylist;
use ruff_source_file::{LineEnding, Locator}; use ruff_source_file::{LineEnding, Locator};

View file

@ -7,8 +7,8 @@ use std::error::Error;
use anyhow::Result; use anyhow::Result;
use libcst_native::{ImportAlias, Name, NameOrAttribute}; use libcst_native::{ImportAlias, Name, NameOrAttribute};
use ruff_python_ast::{self as ast, Ranged, Stmt, Suite};
use ruff_text_size::TextSize; use ruff_text_size::TextSize;
use rustpython_ast::{self as ast, Ranged, Stmt, Suite};
use ruff_diagnostics::Edit; use ruff_diagnostics::Edit;
use ruff_python_ast::imports::{AnyImport, Import, ImportFrom}; use ruff_python_ast::imports::{AnyImport, Import, ImportFrom};

View file

@ -10,10 +10,10 @@ use serde::Serialize;
use serde_json::error::Category; use serde_json::error::Category;
use ruff_diagnostics::Diagnostic; use ruff_diagnostics::Diagnostic;
use ruff_python_parser::lexer::lex;
use ruff_python_parser::Mode;
use ruff_source_file::{NewlineWithTrailingNewline, UniversalNewlineIterator}; use ruff_source_file::{NewlineWithTrailingNewline, UniversalNewlineIterator};
use ruff_text_size::{TextRange, TextSize}; use ruff_text_size::{TextRange, TextSize};
use rustpython_parser::lexer::lex;
use rustpython_parser::Mode;
use crate::autofix::source_map::{SourceMap, SourceMarker}; use crate::autofix::source_map::{SourceMap, SourceMarker};
use crate::jupyter::index::JupyterIndex; use crate::jupyter::index::JupyterIndex;

View file

@ -4,7 +4,7 @@
//! //!
//! TODO(charlie): Consolidate with the existing AST-based docstring extraction. //! TODO(charlie): Consolidate with the existing AST-based docstring extraction.
use rustpython_parser::Tok; use ruff_python_parser::Tok;
#[derive(Default, Copy, Clone)] #[derive(Default, Copy, Clone)]
enum State { enum State {

View file

@ -6,9 +6,9 @@ use anyhow::{anyhow, Result};
use colored::Colorize; use colored::Colorize;
use itertools::Itertools; use itertools::Itertools;
use log::error; use log::error;
use ruff_python_parser::lexer::LexResult;
use ruff_python_parser::ParseError;
use rustc_hash::FxHashMap; use rustc_hash::FxHashMap;
use rustpython_parser::lexer::LexResult;
use rustpython_parser::ParseError;
use ruff_diagnostics::Diagnostic; use ruff_diagnostics::Diagnostic;
use ruff_python_ast::imports::ImportMap; use ruff_python_ast::imports::ImportMap;

View file

@ -7,7 +7,7 @@ use colored::Colorize;
use fern; use fern;
use log::Level; use log::Level;
use once_cell::sync::Lazy; use once_cell::sync::Lazy;
use rustpython_parser::{ParseError, ParseErrorType}; use ruff_python_parser::{ParseError, ParseErrorType};
use ruff_source_file::{OneIndexed, SourceCode, SourceLocation}; use ruff_source_file::{OneIndexed, SourceCode, SourceLocation};

View file

@ -8,8 +8,8 @@ use std::path::Path;
use anyhow::Result; use anyhow::Result;
use itertools::Itertools; use itertools::Itertools;
use log::warn; use log::warn;
use ruff_python_ast::Ranged;
use ruff_text_size::{TextLen, TextRange, TextSize}; use ruff_text_size::{TextLen, TextRange, TextSize};
use rustpython_ast::Ranged;
use ruff_diagnostics::Diagnostic; use ruff_diagnostics::Diagnostic;
use ruff_source_file::{LineEnding, Locator}; use ruff_source_file::{LineEnding, Locator};

View file

@ -1,10 +1,10 @@
use rustpython_ast::{Expr, Ranged}; use ruff_python_ast as ast;
use rustpython_parser::ast; use ruff_python_ast::{Expr, Ranged};
use ruff_diagnostics::{Diagnostic, Violation}; use ruff_diagnostics::{Diagnostic, Violation};
use ruff_macros::{derive_message_formats, violation}; use ruff_macros::{derive_message_formats, violation};
use ruff_python_ast::helpers::find_keyword; use ruff_python_ast::helpers::find_keyword;
use rustpython_ast::Constant; use ruff_python_ast::Constant;
use crate::checkers::ast::Checker; use crate::checkers::ast::Checker;

View file

@ -1,8 +1,8 @@
/// See: [eradicate.py](https://github.com/myint/eradicate/blob/98f199940979c94447a461d50d27862b118b282d/eradicate.py) /// See: [eradicate.py](https://github.com/myint/eradicate/blob/98f199940979c94447a461d50d27862b118b282d/eradicate.py)
use once_cell::sync::Lazy; use once_cell::sync::Lazy;
use regex::Regex; use regex::Regex;
use rustpython_ast::Suite; use ruff_python_ast::Suite;
use rustpython_parser::Parse; use ruff_python_parser::Parse;
static ALLOWLIST_REGEX: Lazy<Regex> = Lazy::new(|| { static ALLOWLIST_REGEX: Lazy<Regex> = Lazy::new(|| {
Regex::new( Regex::new(

View file

@ -1,4 +1,4 @@
use rustpython_ast::Expr; use ruff_python_ast::Expr;
use ruff_python_semantic::SemanticModel; use ruff_python_semantic::SemanticModel;

View file

@ -1,5 +1,5 @@
use num_bigint::BigInt; use num_bigint::BigInt;
use rustpython_ast::{self as ast, CmpOp, Constant, Expr, Ranged}; use ruff_python_ast::{self as ast, CmpOp, Constant, Expr, Ranged};
use ruff_diagnostics::{Diagnostic, Violation}; use ruff_diagnostics::{Diagnostic, Violation};
use ruff_macros::{derive_message_formats, violation}; use ruff_macros::{derive_message_formats, violation};

View file

@ -1,4 +1,4 @@
use rustpython_ast::{Expr, Ranged}; use ruff_python_ast::{Expr, Ranged};
use ruff_diagnostics::{Diagnostic, Violation}; use ruff_diagnostics::{Diagnostic, Violation};
use ruff_macros::{derive_message_formats, violation}; use ruff_macros::{derive_message_formats, violation};

View file

@ -1,5 +1,5 @@
use num_bigint::BigInt; use num_bigint::BigInt;
use rustpython_ast::{self as ast, Constant, Expr, Ranged}; use ruff_python_ast::{self as ast, Constant, Expr, Ranged};
use ruff_diagnostics::{Diagnostic, Violation}; use ruff_diagnostics::{Diagnostic, Violation};
use ruff_macros::{derive_message_formats, violation}; use ruff_macros::{derive_message_formats, violation};

View file

@ -1,6 +1,6 @@
use anyhow::{bail, Result}; use anyhow::{bail, Result};
use rustpython_ast::{Ranged, Stmt}; use ruff_python_ast::{Ranged, Stmt};
use rustpython_parser::{lexer, Mode, Tok}; use ruff_python_parser::{lexer, Mode, Tok};
use ruff_diagnostics::Edit; use ruff_diagnostics::Edit;
use ruff_source_file::Locator; use ruff_source_file::Locator;

View file

@ -1,4 +1,4 @@
use rustpython_ast::{self as ast, Arguments, Expr, Stmt}; use ruff_python_ast::{self as ast, Arguments, Expr, Stmt};
use ruff_python_ast::cast; use ruff_python_ast::cast;
use ruff_python_semantic::analyze::visibility; use ruff_python_semantic::analyze::visibility;

View file

@ -1,4 +1,4 @@
use rustpython_ast::{self as ast, ArgWithDefault, Constant, Expr, Ranged, Stmt}; use ruff_python_ast::{self as ast, ArgWithDefault, Constant, Expr, Ranged, Stmt};
use ruff_diagnostics::{AlwaysAutofixableViolation, Diagnostic, Fix, Violation}; use ruff_diagnostics::{AlwaysAutofixableViolation, Diagnostic, Fix, Violation};
use ruff_macros::{derive_message_formats, violation}; use ruff_macros::{derive_message_formats, violation};

View file

@ -1,5 +1,5 @@
use rustpython_ast::{Expr, Ranged}; use ruff_python_ast as ast;
use rustpython_parser::ast; use ruff_python_ast::{Expr, Ranged};
use ruff_diagnostics::{Diagnostic, Violation}; use ruff_diagnostics::{Diagnostic, Violation};
use ruff_macros::{derive_message_formats, violation}; use ruff_macros::{derive_message_formats, violation};

View file

@ -1,5 +1,5 @@
use rustpython_ast::{Expr, Ranged}; use ruff_python_ast as ast;
use rustpython_parser::ast; use ruff_python_ast::{Expr, Ranged};
use ruff_diagnostics::{Diagnostic, Violation}; use ruff_diagnostics::{Diagnostic, Violation};
use ruff_macros::{derive_message_formats, violation}; use ruff_macros::{derive_message_formats, violation};

View file

@ -1,5 +1,5 @@
use rustpython_ast::{Expr, Ranged}; use ruff_python_ast as ast;
use rustpython_parser::ast; use ruff_python_ast::{Expr, Ranged};
use ruff_diagnostics::{Diagnostic, Violation}; use ruff_diagnostics::{Diagnostic, Violation};
use ruff_macros::{derive_message_formats, violation}; use ruff_macros::{derive_message_formats, violation};

View file

@ -1,6 +1,6 @@
use once_cell::sync::Lazy; use once_cell::sync::Lazy;
use regex::Regex; use regex::Regex;
use rustpython_ast::{self as ast, Constant, Expr}; use ruff_python_ast::{self as ast, Constant, Expr};
use ruff_python_semantic::SemanticModel; use ruff_python_semantic::SemanticModel;

View file

@ -1,5 +1,5 @@
use ruff_python_ast::{Ranged, Stmt};
use ruff_text_size::{TextLen, TextRange}; use ruff_text_size::{TextLen, TextRange};
use rustpython_ast::{Ranged, Stmt};
use ruff_diagnostics::{Diagnostic, Violation}; use ruff_diagnostics::{Diagnostic, Violation};
use ruff_macros::{derive_message_formats, violation}; use ruff_macros::{derive_message_formats, violation};

View file

@ -1,5 +1,5 @@
use num_traits::ToPrimitive; use num_traits::ToPrimitive;
use rustpython_ast::{self as ast, Constant, Expr, Keyword, Operator, Ranged}; use ruff_python_ast::{self as ast, Constant, Expr, Keyword, Operator, Ranged};
use ruff_diagnostics::{Diagnostic, Violation}; use ruff_diagnostics::{Diagnostic, Violation};
use ruff_macros::{derive_message_formats, violation}; use ruff_macros::{derive_message_formats, violation};

View file

@ -1,4 +1,4 @@
use rustpython_ast::{Expr, Ranged}; use ruff_python_ast::{Expr, Ranged};
use ruff_diagnostics::{Diagnostic, Violation}; use ruff_diagnostics::{Diagnostic, Violation};
use ruff_macros::{derive_message_formats, violation}; use ruff_macros::{derive_message_formats, violation};

View file

@ -1,4 +1,4 @@
use rustpython_ast::{Arg, ArgWithDefault, Arguments, Expr, Ranged}; use ruff_python_ast::{Arg, ArgWithDefault, Arguments, Expr, Ranged};
use ruff_diagnostics::{Diagnostic, Violation}; use ruff_diagnostics::{Diagnostic, Violation};
use ruff_macros::{derive_message_formats, violation}; use ruff_macros::{derive_message_formats, violation};

View file

@ -1,4 +1,4 @@
use rustpython_ast::{Keyword, Ranged}; use ruff_python_ast::{Keyword, Ranged};
use ruff_diagnostics::{Diagnostic, Violation}; use ruff_diagnostics::{Diagnostic, Violation};
use ruff_macros::{derive_message_formats, violation}; use ruff_macros::{derive_message_formats, violation};

View file

@ -1,4 +1,4 @@
use rustpython_ast::{self as ast, Constant, Expr, Ranged}; use ruff_python_ast::{self as ast, Constant, Expr, Ranged};
use ruff_diagnostics::{Diagnostic, Violation}; use ruff_diagnostics::{Diagnostic, Violation};
use ruff_macros::{derive_message_formats, violation}; use ruff_macros::{derive_message_formats, violation};

View file

@ -1,6 +1,6 @@
use once_cell::sync::Lazy; use once_cell::sync::Lazy;
use regex::Regex; use regex::Regex;
use rustpython_ast::{self as ast, Expr, Operator, Ranged}; use ruff_python_ast::{self as ast, Expr, Operator, Ranged};
use ruff_diagnostics::{Diagnostic, Violation}; use ruff_diagnostics::{Diagnostic, Violation};
use ruff_macros::{derive_message_formats, violation}; use ruff_macros::{derive_message_formats, violation};

View file

@ -1,4 +1,4 @@
use rustpython_ast::{Expr, Ranged}; use ruff_python_ast::{Expr, Ranged};
use ruff_diagnostics::{Diagnostic, Violation}; use ruff_diagnostics::{Diagnostic, Violation};
use ruff_macros::{derive_message_formats, violation}; use ruff_macros::{derive_message_formats, violation};

View file

@ -1,4 +1,4 @@
use rustpython_ast::{Expr, Keyword, Ranged}; use ruff_python_ast::{Expr, Keyword, Ranged};
use ruff_diagnostics::{Diagnostic, Violation}; use ruff_diagnostics::{Diagnostic, Violation};
use ruff_macros::{derive_message_formats, violation}; use ruff_macros::{derive_message_formats, violation};

View file

@ -1,5 +1,5 @@
use ruff_python_ast::helpers::find_keyword; use ruff_python_ast::helpers::find_keyword;
use rustpython_ast::{self as ast, Constant, Expr, Keyword, Ranged}; use ruff_python_ast::{self as ast, Constant, Expr, Keyword, Ranged};
use ruff_diagnostics::{Diagnostic, Violation}; use ruff_diagnostics::{Diagnostic, Violation};
use ruff_macros::{derive_message_formats, violation}; use ruff_macros::{derive_message_formats, violation};

View file

@ -1,4 +1,4 @@
use rustpython_ast::{Expr, Keyword, Ranged}; use ruff_python_ast::{Expr, Keyword, Ranged};
use ruff_diagnostics::{Diagnostic, Violation}; use ruff_diagnostics::{Diagnostic, Violation};
use ruff_macros::{derive_message_formats, violation}; use ruff_macros::{derive_message_formats, violation};

View file

@ -1,4 +1,4 @@
use rustpython_ast::{Expr, Ranged}; use ruff_python_ast::{Expr, Ranged};
use ruff_diagnostics::{Diagnostic, Violation}; use ruff_diagnostics::{Diagnostic, Violation};
use ruff_macros::{derive_message_formats, violation}; use ruff_macros::{derive_message_formats, violation};

View file

@ -1,4 +1,4 @@
use rustpython_ast::{Expr, Keyword, Ranged}; use ruff_python_ast::{Expr, Keyword, Ranged};
use ruff_diagnostics::{Diagnostic, Violation}; use ruff_diagnostics::{Diagnostic, Violation};
use ruff_macros::{derive_message_formats, violation}; use ruff_macros::{derive_message_formats, violation};

View file

@ -1,4 +1,4 @@
use rustpython_ast::{Expr, Keyword, Ranged}; use ruff_python_ast::{Expr, Keyword, Ranged};
use ruff_diagnostics::{Diagnostic, Violation}; use ruff_diagnostics::{Diagnostic, Violation};
use ruff_macros::{derive_message_formats, violation}; use ruff_macros::{derive_message_formats, violation};

View file

@ -1,6 +1,6 @@
//! Checks relating to shell injection. //! Checks relating to shell injection.
use rustpython_ast::{self as ast, Constant, Expr, Keyword, Ranged}; use ruff_python_ast::{self as ast, Constant, Expr, Keyword, Ranged};
use ruff_diagnostics::{Diagnostic, Violation}; use ruff_diagnostics::{Diagnostic, Violation};
use ruff_macros::{derive_message_formats, violation}; use ruff_macros::{derive_message_formats, violation};

View file

@ -1,5 +1,5 @@
use num_traits::{One, Zero}; use num_traits::{One, Zero};
use rustpython_ast::{self as ast, Constant, Expr, Keyword, Ranged}; use ruff_python_ast::{self as ast, Constant, Expr, Keyword, Ranged};
use ruff_diagnostics::{Diagnostic, Violation}; use ruff_diagnostics::{Diagnostic, Violation};
use ruff_macros::{derive_message_formats, violation}; use ruff_macros::{derive_message_formats, violation};

View file

@ -1,4 +1,4 @@
use rustpython_ast::{Expr, Keyword, Ranged}; use ruff_python_ast::{Expr, Keyword, Ranged};
use ruff_diagnostics::{Diagnostic, Violation}; use ruff_diagnostics::{Diagnostic, Violation};
use ruff_macros::{derive_message_formats, violation}; use ruff_macros::{derive_message_formats, violation};

View file

@ -1,7 +1,7 @@
//! Check for calls to suspicious functions, or calls into suspicious modules. //! Check for calls to suspicious functions, or calls into suspicious modules.
//! //!
//! See: <https://bandit.readthedocs.io/en/latest/blacklists/blacklist_calls.html> //! See: <https://bandit.readthedocs.io/en/latest/blacklists/blacklist_calls.html>
use rustpython_ast::{self as ast, Expr, Ranged}; use ruff_python_ast::{self as ast, Expr, Ranged};
use ruff_diagnostics::{Diagnostic, DiagnosticKind, Violation}; use ruff_diagnostics::{Diagnostic, DiagnosticKind, Violation};
use ruff_macros::{derive_message_formats, violation}; use ruff_macros::{derive_message_formats, violation};

View file

@ -1,4 +1,4 @@
use rustpython_ast::{ExceptHandler, Expr, Ranged, Stmt}; use ruff_python_ast::{ExceptHandler, Expr, Ranged, Stmt};
use ruff_diagnostics::{Diagnostic, Violation}; use ruff_diagnostics::{Diagnostic, Violation};
use ruff_macros::{derive_message_formats, violation}; use ruff_macros::{derive_message_formats, violation};

View file

@ -1,4 +1,4 @@
use rustpython_ast::{ExceptHandler, Expr, Ranged, Stmt}; use ruff_python_ast::{ExceptHandler, Expr, Ranged, Stmt};
use ruff_diagnostics::{Diagnostic, Violation}; use ruff_diagnostics::{Diagnostic, Violation};
use ruff_macros::{derive_message_formats, violation}; use ruff_macros::{derive_message_formats, violation};

View file

@ -1,4 +1,4 @@
use rustpython_ast::{self as ast, Expr, Keyword, Ranged}; use ruff_python_ast::{self as ast, Expr, Keyword, Ranged};
use ruff_diagnostics::{Diagnostic, Violation}; use ruff_diagnostics::{Diagnostic, Violation};
use ruff_macros::{derive_message_formats, violation}; use ruff_macros::{derive_message_formats, violation};

View file

@ -1,4 +1,4 @@
use rustpython_ast::{self as ast, Expr, Ranged, Stmt}; use ruff_python_ast::{self as ast, Expr, Ranged, Stmt};
use ruff_diagnostics::{Diagnostic, Violation}; use ruff_diagnostics::{Diagnostic, Violation};
use ruff_macros::{derive_message_formats, violation}; use ruff_macros::{derive_message_formats, violation};

View file

@ -1,4 +1,4 @@
use rustpython_ast::{self as ast, Constant, Expr, Ranged}; use ruff_python_ast::{self as ast, Constant, Expr, Ranged};
use ruff_diagnostics::{Diagnostic, DiagnosticKind}; use ruff_diagnostics::{Diagnostic, DiagnosticKind};

View file

@ -1,4 +1,4 @@
use rustpython_ast::{ArgWithDefault, Arguments, Decorator}; use ruff_python_ast::{ArgWithDefault, Arguments, Decorator};
use ruff_diagnostics::Violation; use ruff_diagnostics::Violation;
use ruff_macros::{derive_message_formats, violation}; use ruff_macros::{derive_message_formats, violation};

View file

@ -1,4 +1,4 @@
use rustpython_ast::Expr; use ruff_python_ast::Expr;
use ruff_diagnostics::Violation; use ruff_diagnostics::Violation;

View file

@ -1,4 +1,4 @@
use rustpython_ast::{self as ast, ArgWithDefault, Arguments, Constant, Decorator, Expr, Ranged}; use ruff_python_ast::{self as ast, ArgWithDefault, Arguments, Constant, Decorator, Expr, Ranged};
use ruff_diagnostics::Diagnostic; use ruff_diagnostics::Diagnostic;
use ruff_diagnostics::Violation; use ruff_diagnostics::Violation;

View file

@ -1,4 +1,4 @@
use rustpython_ast::{self as ast, Constant, Expr, Keyword, Ranged, Stmt}; use ruff_python_ast::{self as ast, Constant, Expr, Keyword, Ranged, Stmt};
use ruff_diagnostics::{Diagnostic, Violation}; use ruff_diagnostics::{Diagnostic, Violation};
use ruff_macros::{derive_message_formats, violation}; use ruff_macros::{derive_message_formats, violation};

View file

@ -1,5 +1,5 @@
use ruff_python_ast::{self as ast, Expr, ExprContext, Ranged, Stmt};
use ruff_text_size::TextRange; use ruff_text_size::TextRange;
use rustpython_ast::{self as ast, Expr, ExprContext, Ranged, Stmt};
use ruff_diagnostics::{AlwaysAutofixableViolation, Diagnostic, Edit, Fix}; use ruff_diagnostics::{AlwaysAutofixableViolation, Diagnostic, Edit, Fix};
use ruff_macros::{derive_message_formats, violation}; use ruff_macros::{derive_message_formats, violation};

View file

@ -1,6 +1,6 @@
use std::fmt; use std::fmt;
use rustpython_ast::{self as ast, Expr, Ranged, WithItem}; use ruff_python_ast::{self as ast, Expr, Ranged, WithItem};
use ruff_diagnostics::{Diagnostic, Violation}; use ruff_diagnostics::{Diagnostic, Violation};
use ruff_macros::{derive_message_formats, violation}; use ruff_macros::{derive_message_formats, violation};

View file

@ -1,4 +1,4 @@
use rustpython_ast::{self as ast, Expr, Ranged}; use ruff_python_ast::{self as ast, Expr, Ranged};
use ruff_diagnostics::{Diagnostic, Violation}; use ruff_diagnostics::{Diagnostic, Violation};
use ruff_macros::{derive_message_formats, violation}; use ruff_macros::{derive_message_formats, violation};

View file

@ -1,4 +1,4 @@
use rustpython_ast::{self as ast, Decorator, Expr, Ranged}; use ruff_python_ast::{self as ast, Decorator, Expr, Ranged};
use ruff_diagnostics::{Diagnostic, Violation}; use ruff_diagnostics::{Diagnostic, Violation};
use ruff_macros::{derive_message_formats, violation}; use ruff_macros::{derive_message_formats, violation};

View file

@ -1,7 +1,7 @@
use itertools::Itertools; use itertools::Itertools;
use ruff_python_ast::{self as ast, ExceptHandler, Expr, ExprContext, Ranged};
use ruff_text_size::TextRange; use ruff_text_size::TextRange;
use rustc_hash::{FxHashMap, FxHashSet}; use rustc_hash::{FxHashMap, FxHashSet};
use rustpython_ast::{self as ast, ExceptHandler, Expr, ExprContext, Ranged};
use ruff_diagnostics::{AlwaysAutofixableViolation, Violation}; use ruff_diagnostics::{AlwaysAutofixableViolation, Violation};
use ruff_diagnostics::{Diagnostic, Edit, Fix}; use ruff_diagnostics::{Diagnostic, Edit, Fix};

View file

@ -1,5 +1,5 @@
use ruff_python_ast::{self as ast, Expr, Ranged};
use rustc_hash::FxHashSet; use rustc_hash::FxHashSet;
use rustpython_ast::{self as ast, Expr, Ranged};
use ruff_diagnostics::{Diagnostic, Violation}; use ruff_diagnostics::{Diagnostic, Violation};
use ruff_macros::{derive_message_formats, violation}; use ruff_macros::{derive_message_formats, violation};

View file

@ -1,5 +1,5 @@
use rustpython_ast::{self as ast, Ranged}; use ruff_python_ast::{self as ast, Ranged};
use rustpython_ast::{ExceptHandler, Expr}; use ruff_python_ast::{ExceptHandler, Expr};
use ruff_diagnostics::{Diagnostic, Violation}; use ruff_diagnostics::{Diagnostic, Violation};
use ruff_macros::{derive_message_formats, violation}; use ruff_macros::{derive_message_formats, violation};

View file

@ -1,6 +1,6 @@
use std::collections::VecDeque; use std::collections::VecDeque;
use rustpython_ast::{self as ast, ExceptHandler, Expr, Ranged}; use ruff_python_ast::{self as ast, ExceptHandler, Expr, Ranged};
use ruff_diagnostics::{Diagnostic, Violation}; use ruff_diagnostics::{Diagnostic, Violation};
use ruff_macros::{derive_message_formats, violation}; use ruff_macros::{derive_message_formats, violation};

View file

@ -1,4 +1,4 @@
use rustpython_ast::{self as ast, Stmt}; use ruff_python_ast::{self as ast, Stmt};
use ruff_diagnostics::{Diagnostic, Violation}; use ruff_diagnostics::{Diagnostic, Violation};
use ruff_macros::{derive_message_formats, violation}; use ruff_macros::{derive_message_formats, violation};

View file

@ -1,5 +1,5 @@
use ruff_python_ast::{self as ast, ArgWithDefault, Arguments, Expr, Ranged};
use ruff_text_size::TextRange; use ruff_text_size::TextRange;
use rustpython_ast::{self as ast, ArgWithDefault, Arguments, Expr, Ranged};
use ruff_diagnostics::Violation; use ruff_diagnostics::Violation;
use ruff_diagnostics::{Diagnostic, DiagnosticKind}; use ruff_diagnostics::{Diagnostic, DiagnosticKind};

View file

@ -1,4 +1,4 @@
use rustpython_ast::{self as ast, Comprehension, Expr, ExprContext, Ranged, Stmt}; use ruff_python_ast::{self as ast, Comprehension, Expr, ExprContext, Ranged, Stmt};
use ruff_diagnostics::{Diagnostic, Violation}; use ruff_diagnostics::{Diagnostic, Violation};
use ruff_macros::{derive_message_formats, violation}; use ruff_macros::{derive_message_formats, violation};

View file

@ -1,4 +1,4 @@
use rustpython_ast::{self as ast, Constant, Expr, Ranged}; use ruff_python_ast::{self as ast, Constant, Expr, Ranged};
use ruff_diagnostics::{AlwaysAutofixableViolation, Diagnostic, Edit, Fix}; use ruff_diagnostics::{AlwaysAutofixableViolation, Diagnostic, Edit, Fix};
use ruff_macros::{derive_message_formats, violation}; use ruff_macros::{derive_message_formats, violation};

View file

@ -1,4 +1,4 @@
use rustpython_ast::{self as ast, Ranged, Stmt}; use ruff_python_ast::{self as ast, Ranged, Stmt};
use ruff_diagnostics::{Diagnostic, Violation}; use ruff_diagnostics::{Diagnostic, Violation};
use ruff_macros::{derive_message_formats, violation}; use ruff_macros::{derive_message_formats, violation};

View file

@ -1,5 +1,5 @@
use ruff_python_ast::{self as ast, ArgWithDefault, Expr, Ranged};
use rustc_hash::FxHashMap; use rustc_hash::FxHashMap;
use rustpython_ast::{self as ast, ArgWithDefault, Expr, Ranged};
use ruff_diagnostics::{Diagnostic, Violation}; use ruff_diagnostics::{Diagnostic, Violation};
use ruff_macros::{derive_message_formats, violation}; use ruff_macros::{derive_message_formats, violation};

View file

@ -1,4 +1,4 @@
use rustpython_ast::{ArgWithDefault, Arguments, Ranged}; use ruff_python_ast::{ArgWithDefault, Arguments, Ranged};
use ruff_diagnostics::{Diagnostic, Violation}; use ruff_diagnostics::{Diagnostic, Violation};
use ruff_macros::{derive_message_formats, violation}; use ruff_macros::{derive_message_formats, violation};

View file

@ -1,4 +1,4 @@
use rustpython_ast::{Expr, Keyword, Ranged}; use ruff_python_ast::{Expr, Keyword, Ranged};
use ruff_diagnostics::{Diagnostic, Violation}; use ruff_diagnostics::{Diagnostic, Violation};
use ruff_macros::{derive_message_formats, violation}; use ruff_macros::{derive_message_formats, violation};

View file

@ -1,4 +1,4 @@
use rustpython_ast::{Expr, Ranged}; use ruff_python_ast::{Expr, Ranged};
use ruff_diagnostics::{Diagnostic, Violation}; use ruff_diagnostics::{Diagnostic, Violation};
use ruff_macros::{derive_message_formats, violation}; use ruff_macros::{derive_message_formats, violation};

View file

@ -1,5 +1,5 @@
use rustpython_ast::Stmt; use ruff_python_ast as ast;
use rustpython_parser::ast; use ruff_python_ast::Stmt;
use ruff_diagnostics::{Diagnostic, Violation}; use ruff_diagnostics::{Diagnostic, Violation};
use ruff_macros::{derive_message_formats, violation}; use ruff_macros::{derive_message_formats, violation};

View file

@ -1,6 +1,6 @@
use std::fmt; use std::fmt;
use rustpython_ast::{self as ast, Ranged}; use ruff_python_ast::{self as ast, Ranged};
use ruff_diagnostics::{Diagnostic, Violation}; use ruff_diagnostics::{Diagnostic, Violation};
use ruff_macros::{derive_message_formats, violation}; use ruff_macros::{derive_message_formats, violation};

View file

@ -1,4 +1,4 @@
use rustpython_ast::{self as ast, ExceptHandler, Expr, Ranged}; use ruff_python_ast::{self as ast, ExceptHandler, Expr, Ranged};
use ruff_diagnostics::{AlwaysAutofixableViolation, Diagnostic, Edit, Fix}; use ruff_diagnostics::{AlwaysAutofixableViolation, Diagnostic, Edit, Fix};
use ruff_macros::{derive_message_formats, violation}; use ruff_macros::{derive_message_formats, violation};

View file

@ -1,4 +1,4 @@
use rustpython_ast::{self as ast, Comprehension, Expr, Ranged, Stmt}; use ruff_python_ast::{self as ast, Comprehension, Expr, Ranged, Stmt};
use ruff_diagnostics::{Diagnostic, Violation}; use ruff_diagnostics::{Diagnostic, Violation};
use ruff_macros::{derive_message_formats, violation}; use ruff_macros::{derive_message_formats, violation};

View file

@ -1,5 +1,5 @@
use ruff_python_ast::{self as ast, Constant, Expr, ExprContext, Identifier, Ranged, Stmt};
use ruff_text_size::TextRange; use ruff_text_size::TextRange;
use rustpython_ast::{self as ast, Constant, Expr, ExprContext, Identifier, Ranged, Stmt};
use ruff_diagnostics::{AlwaysAutofixableViolation, Diagnostic, Edit, Fix}; use ruff_diagnostics::{AlwaysAutofixableViolation, Diagnostic, Edit, Fix};
use ruff_macros::{derive_message_formats, violation}; use ruff_macros::{derive_message_formats, violation};

View file

@ -1,4 +1,4 @@
use rustpython_ast::{Expr, Keyword, Ranged}; use ruff_python_ast::{Expr, Keyword, Ranged};
use ruff_diagnostics::{Diagnostic, Violation}; use ruff_diagnostics::{Diagnostic, Violation};
use ruff_macros::{derive_message_formats, violation}; use ruff_macros::{derive_message_formats, violation};

View file

@ -1,5 +1,5 @@
use itertools::Itertools; use itertools::Itertools;
use rustpython_ast::{self as ast, Constant, Expr, Ranged}; use ruff_python_ast::{self as ast, Constant, Expr, Ranged};
use ruff_diagnostics::{Diagnostic, Violation}; use ruff_diagnostics::{Diagnostic, Violation};
use ruff_macros::{derive_message_formats, violation}; use ruff_macros::{derive_message_formats, violation};

View file

@ -1,4 +1,4 @@
use rustpython_ast::{self as ast, Expr, Ranged, UnaryOp}; use ruff_python_ast::{self as ast, Expr, Ranged, UnaryOp};
use ruff_diagnostics::{Diagnostic, Violation}; use ruff_diagnostics::{Diagnostic, Violation};
use ruff_macros::{derive_message_formats, violation}; use ruff_macros::{derive_message_formats, violation};

View file

@ -1,4 +1,4 @@
use rustpython_ast::{self as ast, Expr, Ranged, Stmt}; use ruff_python_ast::{self as ast, Expr, Ranged, Stmt};
use ruff_diagnostics::{Diagnostic, Violation}; use ruff_diagnostics::{Diagnostic, Violation};
use ruff_macros::{derive_message_formats, violation}; use ruff_macros::{derive_message_formats, violation};

Some files were not shown because too many files have changed in this diff Show more