mirror of
https://github.com/astral-sh/ruff
synced 2026-01-07 14:44:17 -05:00
test: update snapshots with missing annotations
These updates center around the addition of annotations in the diagnostic rendering. Previously, the annotation was just not rendered at all. With the `annotate-snippets` upgrade, it is now rendered. I examined a pseudo random sample of these, and they all look correct. As will be true in future batches, some of these snapshots also have changes to whitespace in them as well.
This commit is contained in:
committed by
Andrew Gallant
parent
0de8216a25
commit
3fa4479c85
@@ -1,7 +1,6 @@
|
||||
---
|
||||
source: crates/ruff_python_parser/tests/fixtures.rs
|
||||
input_file: crates/ruff_python_parser/resources/inline/err/del_incomplete_target.py
|
||||
snapshot_kind: text
|
||||
---
|
||||
## AST
|
||||
|
||||
@@ -122,4 +121,5 @@ Module(
|
||||
|
|
||||
3 | del x, y[
|
||||
4 | z
|
||||
| ^ Syntax Error: unexpected EOF while parsing
|
||||
|
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
---
|
||||
source: crates/ruff_python_parser/tests/fixtures.rs
|
||||
input_file: crates/ruff_python_parser/resources/inline/err/function_def_unclosed_parameter_list.py
|
||||
snapshot_kind: text
|
||||
---
|
||||
## AST
|
||||
|
||||
@@ -231,4 +230,5 @@ Module(
|
||||
|
|
||||
4 | def foo(a: int, b: str
|
||||
5 | x = 10
|
||||
| ^ Syntax Error: unexpected EOF while parsing
|
||||
|
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
---
|
||||
source: crates/ruff_python_parser/tests/fixtures.rs
|
||||
input_file: crates/ruff_python_parser/resources/inline/err/match_stmt_expect_indented_block.py
|
||||
snapshot_kind: text
|
||||
---
|
||||
## AST
|
||||
|
||||
@@ -63,4 +62,5 @@ Module(
|
||||
|
|
||||
1 | match foo:
|
||||
2 | case _: ...
|
||||
| ^ Syntax Error: Expected dedent, found end of file
|
||||
|
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
---
|
||||
source: crates/ruff_python_parser/tests/fixtures.rs
|
||||
input_file: crates/ruff_python_parser/resources/inline/err/match_stmt_no_newline_before_case.py
|
||||
snapshot_kind: text
|
||||
---
|
||||
## AST
|
||||
|
||||
@@ -61,4 +60,5 @@ Module(
|
||||
|
||||
|
|
||||
1 | match foo: case _: ...
|
||||
| ^ Syntax Error: Expected dedent, found end of file
|
||||
|
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
---
|
||||
source: crates/ruff_python_parser/tests/fixtures.rs
|
||||
input_file: crates/ruff_python_parser/resources/inline/err/node_range_with_gaps.py
|
||||
snapshot_kind: text
|
||||
---
|
||||
## AST
|
||||
|
||||
@@ -120,4 +119,5 @@ Module(
|
||||
|
|
||||
2 | def bar(): ...
|
||||
3 | def baz
|
||||
| ^ Syntax Error: Expected ')', found end of file
|
||||
|
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
---
|
||||
source: crates/ruff_python_parser/tests/fixtures.rs
|
||||
input_file: crates/ruff_python_parser/resources/invalid/statements/if_extra_closing_parentheses.py
|
||||
snapshot_kind: text
|
||||
---
|
||||
## AST
|
||||
|
||||
@@ -77,4 +76,5 @@ Module(
|
||||
|
|
||||
2 | if True)):
|
||||
3 | pass
|
||||
| ^ Syntax Error: Expected a statement
|
||||
|
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
---
|
||||
source: crates/ruff_python_parser/tests/fixtures.rs
|
||||
input_file: crates/ruff_python_parser/resources/invalid/statements/match/as_pattern_2.py
|
||||
snapshot_kind: text
|
||||
---
|
||||
## AST
|
||||
|
||||
@@ -124,4 +123,5 @@ Module(
|
||||
|
|
||||
4 | case x as y + 1j:
|
||||
5 | pass
|
||||
| ^ Syntax Error: Expected a statement
|
||||
|
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
---
|
||||
source: crates/ruff_python_parser/tests/fixtures.rs
|
||||
input_file: crates/ruff_python_parser/resources/invalid/statements/match/as_pattern_3.py
|
||||
snapshot_kind: text
|
||||
---
|
||||
## AST
|
||||
|
||||
@@ -152,4 +151,5 @@ Module(
|
||||
|
|
||||
4 | case {(x as y): 1}:
|
||||
5 | pass
|
||||
| ^ Syntax Error: Expected a statement
|
||||
|
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
---
|
||||
source: crates/ruff_python_parser/tests/fixtures.rs
|
||||
input_file: crates/ruff_python_parser/resources/inline/err/try_stmt_invalid_order.py
|
||||
snapshot_kind: text
|
||||
---
|
||||
## AST
|
||||
|
||||
@@ -81,4 +80,5 @@ Module(
|
||||
|
|
||||
5 | else:
|
||||
6 | pass
|
||||
| ^ Syntax Error: Expected a statement
|
||||
|
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
---
|
||||
source: crates/ruff_python_parser/tests/fixtures.rs
|
||||
input_file: crates/ruff_python_parser/resources/inline/err/try_stmt_missing_except_finally.py
|
||||
snapshot_kind: text
|
||||
---
|
||||
## AST
|
||||
|
||||
@@ -67,4 +66,5 @@ Module(
|
||||
|
|
||||
5 | else:
|
||||
6 | pass
|
||||
| ^ Syntax Error: Expected `except` or `finally` after `try` block
|
||||
|
|
||||
|
||||
Reference in New Issue
Block a user