Skip to content

Commit e1802df

Browse files
committed
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.
1 parent d97d74f commit e1802df

File tree

85 files changed

+153
-151
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

85 files changed

+153
-151
lines changed

crates/ruff_linter/src/rules/flake8_implicit_str_concat/snapshots/ruff_linter__rules__flake8_implicit_str_concat__tests__ISC001_ISC_syntax_error.py.snap

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
---
22
source: crates/ruff_linter/src/rules/flake8_implicit_str_concat/mod.rs
3-
snapshot_kind: text
43
---
54
ISC_syntax_error.py:2:5: SyntaxError: missing closing quote in string literal
65
|
@@ -59,7 +58,7 @@ ISC_syntax_error.py:4:1: ISC001 Implicitly concatenated string literals on one l
5958
4 | / "a" """b
6059
5 | | c""" "d
6160
| |____^ ISC001
62-
6 |
61+
6 |
6362
7 | # For f-strings, the `FStringRanges` won't contain the range for
6463
|
6564
= help: Combine string literals
@@ -70,7 +69,7 @@ ISC_syntax_error.py:5:6: SyntaxError: missing closing quote in string literal
7069
4 | "a" """b
7170
5 | c""" "d
7271
| ^
73-
6 |
72+
6 |
7473
7 | # For f-strings, the `FStringRanges` won't contain the range for
7574
|
7675

@@ -80,7 +79,7 @@ ISC_syntax_error.py:5:8: SyntaxError: Expected a statement
8079
4 | "a" """b
8180
5 | c""" "d
8281
| ^
83-
6 |
82+
6 |
8483
7 | # For f-strings, the `FStringRanges` won't contain the range for
8584
8 | # unterminated f-strings.
8685
|
@@ -144,7 +143,7 @@ ISC_syntax_error.py:11:1: ISC001 Implicitly concatenated string literals on one
144143
11 | / f"a" f"""b
145144
12 | | c""" f"d {e
146145
| |____^ ISC001
147-
13 |
146+
13 |
148147
14 | (
149148
|
150149
= help: Combine string literals
@@ -173,10 +172,12 @@ ISC_syntax_error.py:30:1: SyntaxError: unexpected EOF while parsing
173172
|
174173
28 | "i" "j"
175174
29 | )
175+
| ^
176176
|
177177

178178
ISC_syntax_error.py:30:1: SyntaxError: f-string: unterminated string
179179
|
180180
28 | "i" "j"
181181
29 | )
182+
| ^
182183
|

crates/ruff_linter/src/rules/flake8_implicit_str_concat/snapshots/ruff_linter__rules__flake8_implicit_str_concat__tests__ISC002_ISC_syntax_error.py.snap

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
---
22
source: crates/ruff_linter/src/rules/flake8_implicit_str_concat/mod.rs
3-
snapshot_kind: text
43
---
54
ISC_syntax_error.py:2:5: SyntaxError: missing closing quote in string literal
65
|
@@ -47,7 +46,7 @@ ISC_syntax_error.py:5:6: SyntaxError: missing closing quote in string literal
4746
4 | "a" """b
4847
5 | c""" "d
4948
| ^
50-
6 |
49+
6 |
5150
7 | # For f-strings, the `FStringRanges` won't contain the range for
5251
|
5352

@@ -57,7 +56,7 @@ ISC_syntax_error.py:5:8: SyntaxError: Expected a statement
5756
4 | "a" """b
5857
5 | c""" "d
5958
| ^
60-
6 |
59+
6 |
6160
7 | # For f-strings, the `FStringRanges` won't contain the range for
6261
8 | # unterminated f-strings.
6362
|
@@ -127,10 +126,12 @@ ISC_syntax_error.py:30:1: SyntaxError: unexpected EOF while parsing
127126
|
128127
28 | "i" "j"
129128
29 | )
129+
| ^
130130
|
131131

132132
ISC_syntax_error.py:30:1: SyntaxError: f-string: unterminated string
133133
|
134134
28 | "i" "j"
135135
29 | )
136+
| ^
136137
|

crates/ruff_linter/src/rules/isort/snapshots/ruff_linter__rules__isort__tests__1_separate_subpackage_first_and_third_party_imports.py.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
---
22
source: crates/ruff_linter/src/rules/isort/mod.rs
3-
snapshot_kind: text
43
---
54
separate_subpackage_first_and_third_party_imports.py:1:1: I001 [*] Import block is un-sorted or un-formatted
65
|
@@ -12,6 +11,7 @@ separate_subpackage_first_and_third_party_imports.py:1:1: I001 [*] Import block
1211
6 | | import foo
1312
7 | | import foo.bar
1413
8 | | import foo.bar.baz
14+
| |___________________^ I001
1515
|
1616
= help: Organize imports
1717

crates/ruff_linter/src/rules/isort/snapshots/ruff_linter__rules__isort__tests__2_separate_subpackage_first_and_third_party_imports.py.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
---
22
source: crates/ruff_linter/src/rules/isort/mod.rs
3-
snapshot_kind: text
43
---
54
separate_subpackage_first_and_third_party_imports.py:1:1: I001 [*] Import block is un-sorted or un-formatted
65
|
@@ -12,6 +11,7 @@ separate_subpackage_first_and_third_party_imports.py:1:1: I001 [*] Import block
1211
6 | | import foo
1312
7 | | import foo.bar
1413
8 | | import foo.bar.baz
14+
| |___________________^ I001
1515
|
1616
= help: Organize imports
1717

crates/ruff_linter/src/rules/isort/snapshots/ruff_linter__rules__isort__tests__add_newline_before_comments.py.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
---
22
source: crates/ruff_linter/src/rules/isort/mod.rs
3-
snapshot_kind: text
43
---
54
add_newline_before_comments.py:1:1: I001 [*] Import block is un-sorted or un-formatted
65
|
@@ -11,6 +10,7 @@ add_newline_before_comments.py:1:1: I001 [*] Import block is un-sorted or un-for
1110
5 | | # This is a comment, but it starts a new section, so we don't need to add a newline
1211
6 | | # before it.
1312
7 | | import leading_prefix
13+
| |______________________^ I001
1414
|
1515
= help: Organize imports
1616

crates/ruff_linter/src/rules/isort/snapshots/ruff_linter__rules__isort__tests__as_imports_comments.py.snap

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
11
---
22
source: crates/ruff_linter/src/rules/isort/mod.rs
3-
snapshot_kind: text
43
---
54
as_imports_comments.py:1:1: I001 [*] Import block is un-sorted or un-formatted
65
|
76
1 | / from foo import ( # Comment on `foo`
87
2 | | Member as Alias, # Comment on `Alias`
98
3 | | )
10-
4 | |
9+
4 | |
1110
5 | | from bar import ( # Comment on `bar`
1211
6 | | Member, # Comment on `Member`
1312
7 | | )
14-
8 | |
13+
8 | |
1514
9 | | from baz import ( # Comment on `baz`
1615
10 | | Member as Alias # Comment on `Alias`
1716
11 | | )
18-
12 | |
17+
12 | |
1918
13 | | from bop import ( # Comment on `bop`
2019
14 | | Member # Comment on `Member`
2120
15 | | )
21+
| |__^ I001
2222
|
2323
= help: Organize imports
2424

crates/ruff_linter/src/rules/isort/snapshots/ruff_linter__rules__isort__tests__case_sensitive_case_sensitive.py.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
---
22
source: crates/ruff_linter/src/rules/isort/mod.rs
3-
snapshot_kind: text
43
---
54
case_sensitive.py:1:1: I001 [*] Import block is un-sorted or un-formatted
65
|
@@ -13,6 +12,7 @@ case_sensitive.py:1:1: I001 [*] Import block is un-sorted or un-formatted
1312
7 | | import f
1413
8 | | from g import a, B, c
1514
9 | | from h import A, b, C
15+
| |______________________^ I001
1616
|
1717
= help: Organize imports
1818

crates/ruff_linter/src/rules/isort/snapshots/ruff_linter__rules__isort__tests__closest_to_furthest_relative_imports_order.py.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
---
22
source: crates/ruff_linter/src/rules/isort/mod.rs
3-
snapshot_kind: text
43
---
54
relative_imports_order.py:1:1: I001 [*] Import block is un-sorted or un-formatted
65
|
76
1 | / from ... import a
87
2 | | from .. import b
98
3 | | from . import c
9+
| |________________^ I001
1010
|
1111
= help: Organize imports
1212

crates/ruff_linter/src/rules/isort/snapshots/ruff_linter__rules__isort__tests__combine_as_imports.py.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
---
22
source: crates/ruff_linter/src/rules/isort/mod.rs
3-
snapshot_kind: text
43
---
54
combine_as_imports.py:1:1: I001 [*] Import block is un-sorted or un-formatted
65
|
76
1 | / from module import Class as C
87
2 | | from module import CONSTANT
98
3 | | from module import function
109
4 | | from module import function as f
10+
| |_________________________________^ I001
1111
|
1212
= help: Organize imports
1313

crates/ruff_linter/src/rules/isort/snapshots/ruff_linter__rules__isort__tests__combine_as_imports_combine_as_imports.py.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
---
22
source: crates/ruff_linter/src/rules/isort/mod.rs
3-
snapshot_kind: text
43
---
54
combine_as_imports.py:1:1: I001 [*] Import block is un-sorted or un-formatted
65
|
76
1 | / from module import Class as C
87
2 | | from module import CONSTANT
98
3 | | from module import function
109
4 | | from module import function as f
10+
| |_________________________________^ I001
1111
|
1212
= help: Organize imports
1313

0 commit comments

Comments
 (0)