Upgrade rustpython-parser

This commit is contained in:
Charles Marsh 2022-08-23 12:40:21 -04:00
parent 95ee62448b
commit ab0144ca5b
3 changed files with 12 additions and 9 deletions

15
Cargo.lock generated
View File

@ -1700,7 +1700,7 @@ dependencies = [
[[package]]
name = "rust-python-linter"
version = "0.0.12"
version = "0.0.13"
dependencies = [
"anyhow",
"bincode",
@ -1727,16 +1727,16 @@ dependencies = [
[[package]]
name = "rustpython-ast"
version = "0.1.0"
source = "git+https://github.com/RustPython/RustPython.git?rev=f1c7aebfad707526602c8162c8094a67129b6731#f1c7aebfad707526602c8162c8094a67129b6731"
source = "git+https://github.com/RustPython/RustPython.git?rev=e9970edd775a617226007d3d3cb0fbbc39ed3948#e9970edd775a617226007d3d3cb0fbbc39ed3948"
dependencies = [
"num-bigint",
"rustpython-bytecode",
"rustpython-compiler-core",
]
[[package]]
name = "rustpython-bytecode"
name = "rustpython-compiler-core"
version = "0.1.2"
source = "git+https://github.com/RustPython/RustPython.git?rev=f1c7aebfad707526602c8162c8094a67129b6731#f1c7aebfad707526602c8162c8094a67129b6731"
source = "git+https://github.com/RustPython/RustPython.git?rev=e9970edd775a617226007d3d3cb0fbbc39ed3948#e9970edd775a617226007d3d3cb0fbbc39ed3948"
dependencies = [
"bincode",
"bitflags",
@ -1747,12 +1747,13 @@ dependencies = [
"num-complex",
"serde",
"static_assertions",
"thiserror",
]
[[package]]
name = "rustpython-parser"
version = "0.1.2"
source = "git+https://github.com/RustPython/RustPython.git?rev=f1c7aebfad707526602c8162c8094a67129b6731#f1c7aebfad707526602c8162c8094a67129b6731"
source = "git+https://github.com/RustPython/RustPython.git?rev=e9970edd775a617226007d3d3cb0fbbc39ed3948#e9970edd775a617226007d3d3cb0fbbc39ed3948"
dependencies = [
"ahash",
"anyhow",
@ -1765,6 +1766,8 @@ dependencies = [
"phf 0.10.1",
"phf_codegen 0.10.0",
"rustpython-ast",
"rustpython-compiler-core",
"thiserror",
"tiny-keccak",
"unic-emoji-char",
"unic-ucd-ident",

View File

@ -1,6 +1,6 @@
[package]
name = "rust-python-linter"
version = "0.0.12"
version = "0.0.13"
edition = "2021"
[lib]
@ -23,7 +23,7 @@ notify = { version = "4.0.17" }
pyo3 = { version = "0.16.5", features = ["extension-module", "abi3-py37"] }
rayon = { version = "1.5.3" }
regex = { version = "1.6.0" }
rustpython-parser = { features=["lalrpop"], git = "https://github.com/RustPython/RustPython.git", rev = "f1c7aebfad707526602c8162c8094a67129b6731" }
rustpython-parser = { features=["lalrpop"], git = "https://github.com/RustPython/RustPython.git", rev = "e9970edd775a617226007d3d3cb0fbbc39ed3948" }
serde = { version = "1.0.143", features = ["derive"] }
serde_json = { version = "1.0.83" }
toml = { version = "0.5.9"}

View File

@ -30,7 +30,7 @@ pub fn check_path(path: &Path, settings: &Settings, mode: &cache::Mode) -> Resul
.iter()
.any(|check_code| matches!(CheckKind::new(check_code).lint_source(), LintSource::AST))
{
let python_ast = parser::parse_program(&contents)?;
let python_ast = parser::parse_program(&contents, &path.to_string_lossy())?;
checks.extend(check_ast(&python_ast, settings));
}