Skip to content

Commit

Permalink
Update snapshots with syntax errors
Browse files Browse the repository at this point in the history
  • Loading branch information
dhruvmanila committed Jun 28, 2024
1 parent 1961406 commit 6e96839
Show file tree
Hide file tree
Showing 8 changed files with 520 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,25 @@
---
source: crates/ruff_linter/src/rules/flake8_implicit_str_concat/mod.rs
---
ISC_syntax_error.py:2:5: SyntaxError: missing closing quote in string literal
|
1 | # The lexer doesn't emit a string token if it's unterminated
2 | "a" "b
| ^
3 | "a" "b" "c
4 | "a" """b
|

ISC_syntax_error.py:2:7: SyntaxError: Expected a statement
|
1 | # The lexer doesn't emit a string token if it's unterminated
2 | "a" "b
| ^
3 | "a" "b" "c
4 | "a" """b
5 | c""" "d
|

ISC_syntax_error.py:3:1: ISC001 [*] Implicitly concatenated string literals on one line
|
1 | # The lexer doesn't emit a string token if it's unterminated
Expand All @@ -21,6 +40,26 @@ ISC_syntax_error.py:3:1: ISC001 [*] Implicitly concatenated string literals on o
5 5 | c""" "d
6 6 |

ISC_syntax_error.py:3:9: SyntaxError: missing closing quote in string literal
|
1 | # The lexer doesn't emit a string token if it's unterminated
2 | "a" "b
3 | "a" "b" "c
| ^
4 | "a" """b
5 | c""" "d
|

ISC_syntax_error.py:3:11: SyntaxError: Expected a statement
|
1 | # The lexer doesn't emit a string token if it's unterminated
2 | "a" "b
3 | "a" "b" "c
| ^
4 | "a" """b
5 | c""" "d
|

ISC_syntax_error.py:4:1: ISC001 Implicitly concatenated string literals on one line
|
2 | "a" "b
Expand All @@ -33,6 +72,48 @@ ISC_syntax_error.py:4:1: ISC001 Implicitly concatenated string literals on one l
|
= help: Combine string literals

ISC_syntax_error.py:5:6: SyntaxError: missing closing quote in string literal
|
3 | "a" "b" "c
4 | "a" """b
5 | c""" "d
| ^
6 |
7 | # For f-strings, the `FStringRanges` won't contain the range for
|

ISC_syntax_error.py:5:8: SyntaxError: Expected a statement
|
3 | "a" "b" "c
4 | "a" """b
5 | c""" "d
| ^
6 |
7 | # For f-strings, the `FStringRanges` won't contain the range for
8 | # unterminated f-strings.
|

ISC_syntax_error.py:9:8: SyntaxError: f-string: unterminated string
|
7 | # For f-strings, the `FStringRanges` won't contain the range for
8 | # unterminated f-strings.
9 | f"a" f"b
| ^
10 | f"a" f"b" f"c
11 | f"a" f"""b
|

ISC_syntax_error.py:9:9: SyntaxError: Expected FStringEnd, found newline
|
7 | # For f-strings, the `FStringRanges` won't contain the range for
8 | # unterminated f-strings.
9 | f"a" f"b
| ^
10 | f"a" f"b" f"c
11 | f"a" f"""b
12 | c""" f"d {e
|

ISC_syntax_error.py:10:1: ISC001 [*] Implicitly concatenated string literals on one line
|
8 | # unterminated f-strings.
Expand All @@ -54,6 +135,26 @@ ISC_syntax_error.py:10:1: ISC001 [*] Implicitly concatenated string literals on
12 12 | c""" f"d {e
13 13 |

ISC_syntax_error.py:10:13: SyntaxError: f-string: unterminated string
|
8 | # unterminated f-strings.
9 | f"a" f"b
10 | f"a" f"b" f"c
| ^
11 | f"a" f"""b
12 | c""" f"d {e
|

ISC_syntax_error.py:10:14: SyntaxError: Expected FStringEnd, found newline
|
8 | # unterminated f-strings.
9 | f"a" f"b
10 | f"a" f"b" f"c
| ^
11 | f"a" f"""b
12 | c""" f"d {e
|

ISC_syntax_error.py:11:1: ISC001 Implicitly concatenated string literals on one line
|
9 | f"a" f"b
Expand All @@ -65,3 +166,35 @@ ISC_syntax_error.py:11:1: ISC001 Implicitly concatenated string literals on one
14 | (
|
= help: Combine string literals

ISC_syntax_error.py:16:5: SyntaxError: missing closing quote in string literal
|
14 | (
15 | "a"
16 | "b
| ^
17 | "c"
18 | "d"
|

ISC_syntax_error.py:26:9: SyntaxError: f-string: unterminated triple-quoted string
|
24 | (
25 | """abc"""
26 | f"""def
| ^
27 | "g" "h"
28 | "i" "j"
|

ISC_syntax_error.py:30:1: SyntaxError: unexpected EOF while parsing
|
28 | "i" "j"
29 | )
|

ISC_syntax_error.py:30:1: SyntaxError: f-string: unterminated string
|
28 | "i" "j"
29 | )
|
Original file line number Diff line number Diff line change
@@ -1,4 +1,135 @@
---
source: crates/ruff_linter/src/rules/flake8_implicit_str_concat/mod.rs
---
ISC_syntax_error.py:2:5: SyntaxError: missing closing quote in string literal
|
1 | # The lexer doesn't emit a string token if it's unterminated
2 | "a" "b
| ^
3 | "a" "b" "c
4 | "a" """b
|

ISC_syntax_error.py:2:7: SyntaxError: Expected a statement
|
1 | # The lexer doesn't emit a string token if it's unterminated
2 | "a" "b
| ^
3 | "a" "b" "c
4 | "a" """b
5 | c""" "d
|

ISC_syntax_error.py:3:9: SyntaxError: missing closing quote in string literal
|
1 | # The lexer doesn't emit a string token if it's unterminated
2 | "a" "b
3 | "a" "b" "c
| ^
4 | "a" """b
5 | c""" "d
|

ISC_syntax_error.py:3:11: SyntaxError: Expected a statement
|
1 | # The lexer doesn't emit a string token if it's unterminated
2 | "a" "b
3 | "a" "b" "c
| ^
4 | "a" """b
5 | c""" "d
|

ISC_syntax_error.py:5:6: SyntaxError: missing closing quote in string literal
|
3 | "a" "b" "c
4 | "a" """b
5 | c""" "d
| ^
6 |
7 | # For f-strings, the `FStringRanges` won't contain the range for
|

ISC_syntax_error.py:5:8: SyntaxError: Expected a statement
|
3 | "a" "b" "c
4 | "a" """b
5 | c""" "d
| ^
6 |
7 | # For f-strings, the `FStringRanges` won't contain the range for
8 | # unterminated f-strings.
|

ISC_syntax_error.py:9:8: SyntaxError: f-string: unterminated string
|
7 | # For f-strings, the `FStringRanges` won't contain the range for
8 | # unterminated f-strings.
9 | f"a" f"b
| ^
10 | f"a" f"b" f"c
11 | f"a" f"""b
|

ISC_syntax_error.py:9:9: SyntaxError: Expected FStringEnd, found newline
|
7 | # For f-strings, the `FStringRanges` won't contain the range for
8 | # unterminated f-strings.
9 | f"a" f"b
| ^
10 | f"a" f"b" f"c
11 | f"a" f"""b
12 | c""" f"d {e
|

ISC_syntax_error.py:10:13: SyntaxError: f-string: unterminated string
|
8 | # unterminated f-strings.
9 | f"a" f"b
10 | f"a" f"b" f"c
| ^
11 | f"a" f"""b
12 | c""" f"d {e
|

ISC_syntax_error.py:10:14: SyntaxError: Expected FStringEnd, found newline
|
8 | # unterminated f-strings.
9 | f"a" f"b
10 | f"a" f"b" f"c
| ^
11 | f"a" f"""b
12 | c""" f"d {e
|

ISC_syntax_error.py:16:5: SyntaxError: missing closing quote in string literal
|
14 | (
15 | "a"
16 | "b
| ^
17 | "c"
18 | "d"
|

ISC_syntax_error.py:26:9: SyntaxError: f-string: unterminated triple-quoted string
|
24 | (
25 | """abc"""
26 | f"""def
| ^
27 | "g" "h"
28 | "i" "j"
|

ISC_syntax_error.py:30:1: SyntaxError: unexpected EOF while parsing
|
28 | "i" "j"
29 | )
|

ISC_syntax_error.py:30:1: SyntaxError: f-string: unterminated string
|
28 | "i" "j"
29 | )
|
Original file line number Diff line number Diff line change
@@ -1,6 +1,25 @@
---
source: crates/ruff_linter/src/rules/pycodestyle/mod.rs
---
E30_syntax_error.py:4:15: SyntaxError: Expected ']', found '('
|
2 | # parenthesis.
3 |
4 | def foo[T1, T2():
| ^
5 | pass
|

E30_syntax_error.py:13:18: SyntaxError: Expected ')', found newline
|
12 | class Foo:
13 | def __init__(
| ^
14 | pass
15 | def method():
16 | pass
|

E30_syntax_error.py:15:5: E301 [*] Expected 1 blank line, found 0
|
13 | def __init__(
Expand All @@ -18,4 +37,24 @@ E30_syntax_error.py:15:5: E301 [*] Expected 1 blank line, found 0
15 |+
15 16 | def method():
16 17 | pass
17 18 |
17 18 |

E30_syntax_error.py:18:11: SyntaxError: Expected ')', found newline
|
16 | pass
17 |
18 | foo = Foo(
| ^
19 |
20 |
21 | def top(
|

E30_syntax_error.py:21:9: SyntaxError: Expected ')', found newline
|
21 | def top(
| ^
22 | def nested1():
23 | pass
24 | def nested2():
|
Loading

0 comments on commit 6e96839

Please sign in to comment.