diff --git a/Cargo.lock b/Cargo.lock index 4ade53ccad..65324c994f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1844,7 +1844,7 @@ dependencies = [ [[package]] name = "rustpython-ast" version = "0.1.0" -source = "git+https://github.com/charliermarsh/RustPython.git?rev=966a80597d626a9a47eaec78471164422d341453#966a80597d626a9a47eaec78471164422d341453" +source = "git+https://github.com/charliermarsh/RustPython.git?rev=4f457893efc381ad5c432576b24bcc7e4a08c641#4f457893efc381ad5c432576b24bcc7e4a08c641" dependencies = [ "num-bigint", "rustpython-compiler-core", @@ -1853,7 +1853,7 @@ dependencies = [ [[package]] name = "rustpython-compiler-core" version = "0.1.2" -source = "git+https://github.com/charliermarsh/RustPython.git?rev=966a80597d626a9a47eaec78471164422d341453#966a80597d626a9a47eaec78471164422d341453" +source = "git+https://github.com/charliermarsh/RustPython.git?rev=4f457893efc381ad5c432576b24bcc7e4a08c641#4f457893efc381ad5c432576b24bcc7e4a08c641" dependencies = [ "bincode", "bitflags", @@ -1870,7 +1870,7 @@ dependencies = [ [[package]] name = "rustpython-parser" version = "0.1.2" -source = "git+https://github.com/charliermarsh/RustPython.git?rev=966a80597d626a9a47eaec78471164422d341453#966a80597d626a9a47eaec78471164422d341453" +source = "git+https://github.com/charliermarsh/RustPython.git?rev=4f457893efc381ad5c432576b24bcc7e4a08c641#4f457893efc381ad5c432576b24bcc7e4a08c641" dependencies = [ "ahash", "anyhow", diff --git a/Cargo.toml b/Cargo.toml index 91d7e0dfe6..0c9d0d0869 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -26,7 +26,7 @@ once_cell = { version = "1.13.1" } path-absolutize = { version = "3.0.13", features = ["once_cell_cache"] } rayon = { version = "1.5.3" } regex = { version = "1.6.0" } -rustpython-parser = { features = ["lalrpop"], git = "https://github.com/charliermarsh/RustPython.git", rev = "966a80597d626a9a47eaec78471164422d341453" } +rustpython-parser = { features = ["lalrpop"], git = "https://github.com/charliermarsh/RustPython.git", rev = "4f457893efc381ad5c432576b24bcc7e4a08c641" } serde = { version = "1.0.143", features = ["derive"] } serde_json = { version = "1.0.83" } toml = { version = "0.5.9" } diff --git a/src/check_ast.rs b/src/check_ast.rs index a4775ef3aa..7c70931534 100644 --- a/src/check_ast.rs +++ b/src/check_ast.rs @@ -1046,6 +1046,7 @@ where self.handle_node_store( &Expr::new( excepthandler.location, + excepthandler.end_location, ExprKind::Name { id: name.to_string(), ctx: ExprContext::Store, @@ -1064,6 +1065,7 @@ where self.handle_node_store( &Expr::new( excepthandler.location, + excepthandler.end_location, ExprKind::Name { id: name.to_string(), ctx: ExprContext::Store, diff --git a/src/snapshots/ruff__linter__tests__f901.snap b/src/snapshots/ruff__linter__tests__f901.snap index f94190226e..cb49b484d1 100644 --- a/src/snapshots/ruff__linter__tests__f901.snap +++ b/src/snapshots/ruff__linter__tests__f901.snap @@ -5,7 +5,7 @@ expression: checks - kind: RaiseNotImplemented location: row: 2 - column: 25 + column: 11 fix: ~ - kind: RaiseNotImplemented location: diff --git a/src/snapshots/ruff__linter__tests__r002.snap b/src/snapshots/ruff__linter__tests__r002.snap index 00abd37f6a..a33b6e98b0 100644 --- a/src/snapshots/ruff__linter__tests__r002.snap +++ b/src/snapshots/ruff__linter__tests__r002.snap @@ -5,27 +5,27 @@ expression: checks - kind: NoAssertEquals location: row: 1 - column: 5 + column: 1 fix: content: assertEqual start: row: 1 - column: 6 + column: 2 end: row: 1 - column: 18 + column: 14 applied: false - kind: NoAssertEquals location: row: 2 - column: 5 + column: 1 fix: content: assertEqual start: row: 2 - column: 6 + column: 2 end: row: 2 - column: 18 + column: 14 applied: false