-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
30ee526
commit 7b42997
Showing
9 changed files
with
521 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
131 changes: 131 additions & 0 deletions
131
...ts/ruff_linter__rules__flake8_implicit_str_concat__tests__ISC002_ISC_syntax_error.py.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ) | ||
| |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.