mirror of
https://github.com/astral-sh/ruff.git
synced 2025-08-03 18:28:56 +00:00
test: update snapshots with missing ^
The previous rendering just seems wrong in that a `^` is omitted. The new version of `annotate-snippets` seems to get this right. I checked a pseudo random sample of these, and it seems to only happen when the position pointed at a line terminator.
This commit is contained in:
parent
f29f58105b
commit
f49cfb6c28
35 changed files with 161 additions and 193 deletions
|
@ -1,7 +1,6 @@
|
|||
---
|
||||
source: crates/ruff_python_parser/tests/fixtures.rs
|
||||
input_file: crates/ruff_python_parser/resources/invalid/expressions/attribute/no_member.py
|
||||
snapshot_kind: text
|
||||
---
|
||||
## AST
|
||||
|
||||
|
@ -77,7 +76,7 @@ Module(
|
|||
2 | first.
|
||||
| ^ Syntax Error: Expected an identifier
|
||||
3 | second
|
||||
4 |
|
||||
4 |
|
||||
5 | # No member access after the dot.
|
||||
|
|
||||
|
||||
|
@ -85,5 +84,5 @@ Module(
|
|||
|
|
||||
5 | # No member access after the dot.
|
||||
6 | last.
|
||||
| Syntax Error: Expected an identifier
|
||||
| ^ Syntax Error: Expected an identifier
|
||||
|
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
---
|
||||
source: crates/ruff_python_parser/tests/fixtures.rs
|
||||
input_file: crates/ruff_python_parser/resources/invalid/expressions/dict/missing_closing_brace_0.py
|
||||
snapshot_kind: text
|
||||
---
|
||||
## AST
|
||||
|
||||
|
@ -76,7 +75,7 @@ Module(
|
|||
|
||||
|
|
||||
1 | {x:
|
||||
2 |
|
||||
2 |
|
||||
3 | def foo():
|
||||
| ^^^ Syntax Error: Expected an identifier, but found a keyword 'def' that cannot be used here
|
||||
4 | pass
|
||||
|
@ -85,7 +84,7 @@ Module(
|
|||
|
||||
|
|
||||
1 | {x:
|
||||
2 |
|
||||
2 |
|
||||
3 | def foo():
|
||||
| ^^^ Syntax Error: Expected ',', found name
|
||||
4 | pass
|
||||
|
@ -102,5 +101,5 @@ Module(
|
|||
|
|
||||
3 | def foo():
|
||||
4 | pass
|
||||
| Syntax Error: unexpected EOF while parsing
|
||||
| ^ 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/invalid/expressions/dict/missing_closing_brace_1.py
|
||||
snapshot_kind: text
|
||||
---
|
||||
## AST
|
||||
|
||||
|
@ -63,7 +62,7 @@ Module(
|
|||
|
||||
|
|
||||
1 | {x:
|
||||
2 |
|
||||
2 |
|
||||
3 | 1 + 2
|
||||
| Syntax Error: unexpected EOF while parsing
|
||||
| ^ 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/invalid/expressions/list/missing_closing_bracket_0.py
|
||||
snapshot_kind: text
|
||||
---
|
||||
## AST
|
||||
|
||||
|
@ -38,7 +37,7 @@ Module(
|
|||
|
||||
|
|
||||
1 | # Missing closing bracket 0: No elements
|
||||
2 |
|
||||
2 |
|
||||
3 | [
|
||||
| Syntax Error: unexpected EOF while parsing
|
||||
| ^ 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/invalid/expressions/list/missing_closing_bracket_1.py
|
||||
snapshot_kind: text
|
||||
---
|
||||
## AST
|
||||
|
||||
|
@ -51,7 +50,7 @@ Module(
|
|||
|
||||
|
|
||||
4 | [
|
||||
5 |
|
||||
5 |
|
||||
6 | x + y
|
||||
| Syntax Error: unexpected EOF while parsing
|
||||
| ^ 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/invalid/expressions/list/missing_closing_bracket_2.py
|
||||
snapshot_kind: text
|
||||
---
|
||||
## AST
|
||||
|
||||
|
@ -59,7 +58,7 @@ Module(
|
|||
|
||||
|
|
||||
4 | [1,
|
||||
5 |
|
||||
5 |
|
||||
6 | x + y
|
||||
| Syntax Error: unexpected EOF while parsing
|
||||
| ^ 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/invalid/expressions/named/missing_expression_0.py
|
||||
snapshot_kind: text
|
||||
---
|
||||
## AST
|
||||
|
||||
|
@ -30,7 +29,7 @@ Module(
|
|||
|
||||
|
|
||||
1 | # There are no parentheses, so this isn't parsed as named expression.
|
||||
2 |
|
||||
2 |
|
||||
3 | x :=
|
||||
| ^^ Syntax Error: Expected a statement
|
||||
|
|
||||
|
@ -38,7 +37,7 @@ Module(
|
|||
|
||||
|
|
||||
1 | # There are no parentheses, so this isn't parsed as named expression.
|
||||
2 |
|
||||
2 |
|
||||
3 | x :=
|
||||
| Syntax Error: Expected a statement
|
||||
| ^ 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/expressions/named/missing_expression_1.py
|
||||
snapshot_kind: text
|
||||
---
|
||||
## AST
|
||||
|
||||
|
@ -42,7 +41,7 @@ Module(
|
|||
|
||||
|
|
||||
1 | # EOF after the `:=` token
|
||||
2 |
|
||||
2 |
|
||||
3 | (x :=
|
||||
| Syntax Error: unexpected EOF while parsing
|
||||
| ^ 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/invalid/expressions/named/missing_expression_2.py
|
||||
snapshot_kind: text
|
||||
---
|
||||
## AST
|
||||
|
||||
|
@ -73,7 +72,7 @@ Module(
|
|||
|
||||
|
|
||||
3 | (x :=
|
||||
4 |
|
||||
4 |
|
||||
5 | def foo():
|
||||
| ^^^ Syntax Error: Expected an identifier, but found a keyword 'def' that cannot be used here
|
||||
6 | pass
|
||||
|
@ -82,7 +81,7 @@ Module(
|
|||
|
||||
|
|
||||
3 | (x :=
|
||||
4 |
|
||||
4 |
|
||||
5 | def foo():
|
||||
| ^^^ Syntax Error: Expected ')', found name
|
||||
6 | pass
|
||||
|
@ -99,5 +98,5 @@ Module(
|
|||
|
|
||||
5 | def foo():
|
||||
6 | pass
|
||||
| Syntax Error: unexpected EOF while parsing
|
||||
| ^ 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/invalid/expressions/named/missing_expression_3.py
|
||||
snapshot_kind: text
|
||||
---
|
||||
## AST
|
||||
|
||||
|
@ -55,7 +54,7 @@ Module(
|
|||
|
||||
|
|
||||
4 | (x :=
|
||||
5 |
|
||||
5 |
|
||||
6 | x + y
|
||||
| Syntax Error: unexpected EOF while parsing
|
||||
| ^ 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/invalid/expressions/parenthesized/generator.py
|
||||
snapshot_kind: text
|
||||
---
|
||||
## AST
|
||||
|
||||
|
@ -141,5 +140,5 @@ Module(
|
|||
|
|
||||
1 | (*x for x in y)
|
||||
2 | (x := 1, for x in y)
|
||||
| Syntax Error: Expected a statement
|
||||
| ^ 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/expressions/parenthesized/missing_closing_paren_0.py
|
||||
snapshot_kind: text
|
||||
---
|
||||
## AST
|
||||
|
||||
|
@ -30,7 +29,7 @@ Module(
|
|||
|
||||
|
|
||||
1 | # Missing closing parentheses 0: No elements
|
||||
2 |
|
||||
2 |
|
||||
3 | (
|
||||
| Syntax Error: unexpected EOF while parsing
|
||||
| ^ 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/invalid/expressions/parenthesized/missing_closing_paren_1.py
|
||||
snapshot_kind: text
|
||||
---
|
||||
## AST
|
||||
|
||||
|
@ -43,7 +42,7 @@ Module(
|
|||
|
||||
|
|
||||
4 | (
|
||||
5 |
|
||||
5 |
|
||||
6 | x + y
|
||||
| Syntax Error: unexpected EOF while parsing
|
||||
| ^ 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/invalid/expressions/parenthesized/missing_closing_paren_2.py
|
||||
snapshot_kind: text
|
||||
---
|
||||
## AST
|
||||
|
||||
|
@ -60,7 +59,7 @@ Module(
|
|||
|
||||
|
|
||||
4 | (1,
|
||||
5 |
|
||||
5 |
|
||||
6 | x + y
|
||||
| Syntax Error: unexpected EOF while parsing
|
||||
| ^ 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/invalid/expressions/set/missing_closing_curly_brace_0.py
|
||||
snapshot_kind: text
|
||||
---
|
||||
## AST
|
||||
|
||||
|
@ -37,7 +36,7 @@ Module(
|
|||
|
||||
|
|
||||
1 | # Missing closing curly brace 0: No elements
|
||||
2 |
|
||||
2 |
|
||||
3 | {
|
||||
| Syntax Error: unexpected EOF while parsing
|
||||
| ^ 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/invalid/expressions/set/missing_closing_curly_brace_1.py
|
||||
snapshot_kind: text
|
||||
---
|
||||
## AST
|
||||
|
||||
|
@ -50,7 +49,7 @@ Module(
|
|||
|
||||
|
|
||||
4 | {
|
||||
5 |
|
||||
5 |
|
||||
6 | x + y
|
||||
| Syntax Error: unexpected EOF while parsing
|
||||
| ^ 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/invalid/expressions/set/missing_closing_curly_brace_2.py
|
||||
snapshot_kind: text
|
||||
---
|
||||
## AST
|
||||
|
||||
|
@ -58,7 +57,7 @@ Module(
|
|||
|
||||
|
|
||||
4 | {1,
|
||||
5 |
|
||||
5 |
|
||||
6 | x + y
|
||||
| Syntax Error: unexpected EOF while parsing
|
||||
| ^ 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/invalid/expressions/subscript/unclosed_slice_0.py
|
||||
snapshot_kind: text
|
||||
---
|
||||
## AST
|
||||
|
||||
|
@ -65,7 +64,7 @@ Module(
|
|||
|
||||
|
|
||||
1 | x[:
|
||||
2 |
|
||||
2 |
|
||||
3 | x + y
|
||||
| Syntax Error: unexpected EOF while parsing
|
||||
| ^ 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/invalid/expressions/subscript/unclosed_slice_1.py
|
||||
snapshot_kind: text
|
||||
---
|
||||
## AST
|
||||
|
||||
|
@ -83,7 +82,7 @@ Module(
|
|||
|
||||
|
|
||||
1 | x[::
|
||||
2 |
|
||||
2 |
|
||||
3 | def foo():
|
||||
| ^^^ Syntax Error: Expected an identifier, but found a keyword 'def' that cannot be used here
|
||||
4 | pass
|
||||
|
@ -92,7 +91,7 @@ Module(
|
|||
|
||||
|
|
||||
1 | x[::
|
||||
2 |
|
||||
2 |
|
||||
3 | def foo():
|
||||
| ^^^ Syntax Error: Expected ']', found name
|
||||
4 | pass
|
||||
|
@ -109,5 +108,5 @@ Module(
|
|||
|
|
||||
3 | def foo():
|
||||
4 | pass
|
||||
| Syntax Error: unexpected EOF while parsing
|
||||
| ^ 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/f_string_unclosed_lbrace.py
|
||||
snapshot_kind: text
|
||||
---
|
||||
## AST
|
||||
|
||||
|
@ -224,7 +223,7 @@ Module(
|
|||
|
||||
|
|
||||
1 | f"{"
|
||||
| Syntax Error: f-string: unterminated string
|
||||
| ^ Syntax Error: f-string: unterminated string
|
||||
2 | f"{foo!r"
|
||||
3 | f"{foo="
|
||||
|
|
||||
|
@ -232,7 +231,7 @@ Module(
|
|||
|
||||
|
|
||||
1 | f"{"
|
||||
| Syntax Error: f-string: unterminated string
|
||||
| ^ Syntax Error: f-string: unterminated string
|
||||
2 | f"{foo!r"
|
||||
3 | f"{foo="
|
||||
|
|
||||
|
@ -250,7 +249,7 @@ Module(
|
|||
|
|
||||
1 | f"{"
|
||||
2 | f"{foo!r"
|
||||
| Syntax Error: f-string: unterminated string
|
||||
| ^ Syntax Error: f-string: unterminated string
|
||||
3 | f"{foo="
|
||||
4 | f"{"
|
||||
|
|
||||
|
@ -259,7 +258,7 @@ Module(
|
|||
|
|
||||
1 | f"{"
|
||||
2 | f"{foo!r"
|
||||
| Syntax Error: f-string: unterminated string
|
||||
| ^ Syntax Error: f-string: unterminated string
|
||||
3 | f"{foo="
|
||||
4 | f"{"
|
||||
|
|
||||
|
@ -278,7 +277,7 @@ Module(
|
|||
|
|
||||
1 | f"{"
|
||||
2 | f"{foo!r"
|
||||
| Syntax Error: Expected FStringEnd, found Unknown
|
||||
| ^ Syntax Error: Expected FStringEnd, found Unknown
|
||||
3 | f"{foo="
|
||||
4 | f"{"
|
||||
|
|
||||
|
@ -298,7 +297,7 @@ Module(
|
|||
1 | f"{"
|
||||
2 | f"{foo!r"
|
||||
3 | f"{foo="
|
||||
| Syntax Error: f-string: unterminated string
|
||||
| ^ Syntax Error: f-string: unterminated string
|
||||
4 | f"{"
|
||||
5 | f"""{"""
|
||||
|
|
||||
|
@ -308,7 +307,7 @@ Module(
|
|||
1 | f"{"
|
||||
2 | f"{foo!r"
|
||||
3 | f"{foo="
|
||||
| Syntax Error: f-string: unterminated string
|
||||
| ^ Syntax Error: f-string: unterminated string
|
||||
4 | f"{"
|
||||
5 | f"""{"""
|
||||
|
|
||||
|
@ -342,10 +341,12 @@ Module(
|
|||
|
|
||||
4 | f"{"
|
||||
5 | f"""{"""
|
||||
| ^ Syntax Error: unexpected EOF while parsing
|
||||
|
|
||||
|
||||
|
||||
|
|
||||
4 | f"{"
|
||||
5 | f"""{"""
|
||||
| ^ Syntax Error: f-string: unterminated string
|
||||
|
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
---
|
||||
source: crates/ruff_python_parser/tests/fixtures.rs
|
||||
input_file: crates/ruff_python_parser/resources/inline/err/implicitly_concatenated_unterminated_string.py
|
||||
snapshot_kind: text
|
||||
---
|
||||
## AST
|
||||
|
||||
|
@ -174,6 +173,6 @@ Module(
|
|||
1 | 'hello' 'world
|
||||
2 | 1 + 1
|
||||
3 | 'hello' f'world {x}
|
||||
| Syntax Error: f-string: unterminated string
|
||||
| ^ Syntax Error: f-string: unterminated string
|
||||
4 | 2 + 2
|
||||
|
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
---
|
||||
source: crates/ruff_python_parser/tests/fixtures.rs
|
||||
input_file: crates/ruff_python_parser/resources/inline/err/implicitly_concatenated_unterminated_string_multiline.py
|
||||
snapshot_kind: text
|
||||
---
|
||||
## AST
|
||||
|
||||
|
@ -189,7 +188,7 @@ Module(
|
|||
1 | (
|
||||
2 | 'hello'
|
||||
3 | f'world {x}
|
||||
| Syntax Error: f-string: unterminated string
|
||||
| ^ Syntax Error: f-string: unterminated string
|
||||
4 | )
|
||||
5 | 1 + 1
|
||||
|
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
---
|
||||
source: crates/ruff_python_parser/tests/fixtures.rs
|
||||
input_file: crates/ruff_python_parser/resources/invalid/re_lex_logical_token.py
|
||||
snapshot_kind: text
|
||||
---
|
||||
## AST
|
||||
|
||||
|
@ -708,8 +707,8 @@ Module(
|
|||
13 | # There are multiple non-logical newlines (blank lines) in the `if` body
|
||||
14 | if call(foo
|
||||
| ^ Syntax Error: Expected ')', found newline
|
||||
15 |
|
||||
16 |
|
||||
15 |
|
||||
16 |
|
||||
17 | def bar():
|
||||
|
|
||||
|
||||
|
@ -775,7 +774,7 @@ Module(
|
|||
|
|
||||
49 | # F-strings uses normal list parsing, so test those as well
|
||||
50 | if call(f"hello {x
|
||||
| Syntax Error: f-string: unterminated string
|
||||
| ^ Syntax Error: f-string: unterminated string
|
||||
51 | def bar():
|
||||
52 | pass
|
||||
|
|
||||
|
@ -793,7 +792,7 @@ Module(
|
|||
|
|
||||
49 | # F-strings uses normal list parsing, so test those as well
|
||||
50 | if call(f"hello {x
|
||||
| Syntax Error: Expected FStringEnd, found Unknown
|
||||
| ^ Syntax Error: Expected FStringEnd, found Unknown
|
||||
51 | def bar():
|
||||
52 | pass
|
||||
|
|
||||
|
@ -835,5 +834,5 @@ Module(
|
|||
55 | if call(f"hello
|
||||
56 | def bar():
|
||||
57 | pass
|
||||
| Syntax Error: Expected a statement
|
||||
| ^ 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/re_lex_logical_token_mac_eol.py
|
||||
snapshot_kind: text
|
||||
---
|
||||
## AST
|
||||
|
||||
|
@ -101,5 +100,5 @@ Module(
|
|||
|
||||
|
|
||||
1 | if call(foo, [a, b
def bar():
pass
|
||||
| Syntax Error: Expected ']', found NonLogicalNewline
|
||||
| ^ Syntax Error: Expected ']', found NonLogicalNewline
|
||||
|
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
---
|
||||
source: crates/ruff_python_parser/tests/fixtures.rs
|
||||
input_file: crates/ruff_python_parser/resources/invalid/re_lexing/triple_quoted_fstring_1.py
|
||||
snapshot_kind: text
|
||||
---
|
||||
## AST
|
||||
|
||||
|
@ -65,7 +64,7 @@ Module(
|
|||
|
||||
|
|
||||
3 | # https://github.com/astral-sh/ruff/issues/11929
|
||||
4 |
|
||||
4 |
|
||||
5 | f"""hello {x # comment
|
||||
| ___________________________^
|
||||
6 | | y = 1
|
||||
|
@ -82,7 +81,7 @@ Module(
|
|||
|
||||
|
|
||||
3 | # https://github.com/astral-sh/ruff/issues/11929
|
||||
4 |
|
||||
4 |
|
||||
5 | f"""hello {x # comment
|
||||
| ___________________________^
|
||||
6 | | y = 1
|
||||
|
@ -93,5 +92,5 @@ Module(
|
|||
|
|
||||
5 | f"""hello {x # comment
|
||||
6 | y = 1
|
||||
| Syntax Error: Expected a statement
|
||||
| ^ 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/with/unclosed_ambiguous_lpar.py
|
||||
snapshot_kind: text
|
||||
---
|
||||
## AST
|
||||
|
||||
|
@ -65,14 +64,14 @@ Module(
|
|||
|
|
||||
1 | with (:
|
||||
| ^ Syntax Error: Expected an expression
|
||||
2 |
|
||||
2 |
|
||||
3 | x + y
|
||||
|
|
||||
|
||||
|
||||
|
|
||||
1 | with (:
|
||||
2 |
|
||||
2 |
|
||||
3 | x + y
|
||||
| Syntax Error: unexpected EOF while parsing
|
||||
| ^ 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/invalid/statements/with/unclosed_ambiguous_lpar_eof.py
|
||||
snapshot_kind: text
|
||||
---
|
||||
## AST
|
||||
|
||||
|
@ -38,5 +37,5 @@ Module(
|
|||
|
||||
|
|
||||
1 | with (
|
||||
| Syntax Error: unexpected EOF while parsing
|
||||
| ^ 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/unterminated_fstring_newline_recovery.py
|
||||
snapshot_kind: text
|
||||
---
|
||||
## AST
|
||||
|
||||
|
@ -316,7 +315,7 @@ Module(
|
|||
1 | f"hello
|
||||
2 | 1 + 1
|
||||
3 | f"hello {x
|
||||
| Syntax Error: f-string: unterminated string
|
||||
| ^ Syntax Error: f-string: unterminated string
|
||||
4 | 2 + 2
|
||||
5 | f"hello {x:
|
||||
|
|
||||
|
@ -336,7 +335,7 @@ Module(
|
|||
1 | f"hello
|
||||
2 | 1 + 1
|
||||
3 | f"hello {x
|
||||
| Syntax Error: Expected FStringEnd, found Unknown
|
||||
| ^ Syntax Error: Expected FStringEnd, found Unknown
|
||||
4 | 2 + 2
|
||||
5 | f"hello {x:
|
||||
|
|
||||
|
@ -346,7 +345,7 @@ Module(
|
|||
3 | f"hello {x
|
||||
4 | 2 + 2
|
||||
5 | f"hello {x:
|
||||
| Syntax Error: f-string: unterminated string
|
||||
| ^ Syntax Error: f-string: unterminated string
|
||||
6 | 3 + 3
|
||||
7 | f"hello {x}
|
||||
|
|
||||
|
@ -356,6 +355,6 @@ Module(
|
|||
5 | f"hello {x:
|
||||
6 | 3 + 3
|
||||
7 | f"hello {x}
|
||||
| Syntax Error: f-string: unterminated string
|
||||
| ^ Syntax Error: f-string: unterminated string
|
||||
8 | 4 + 4
|
||||
|
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue