Skip to content

Commit 0de8216

Browse files
committed
test: update snapshots with just whitespace changes
These snapshot changes should *all* only be a result of changes to trailing whitespace in the output. I checked a psuedo random sample of these, and the whitespace found in the previous snapshots seems to be an artifact of the rendering and _not_ of the source data. So this seems like a strict bug fix to me. There are other snapshots with whitespace changes, but they also have other changes that we split out into separate commits. Basically, we're going to do approximately one commit per category of change. This represents, by far, the biggest chunk of changes to snapshots as a result of the `annotate-snippets` upgrade.
1 parent 2922490 commit 0de8216

File tree

779 files changed

+3619
-4333
lines changed

Some content is hidden

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

779 files changed

+3619
-4333
lines changed

crates/ruff/tests/integration_test.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -623,7 +623,7 @@ fn stdin_override_parser_py() {
623623
fn stdin_fix_when_not_fixable_should_still_print_contents() {
624624
let mut cmd = RuffCheck::default().args(["--fix"]).build();
625625
assert_cmd_snapshot!(cmd
626-
.pass_stdin("import os\nimport sys\n\nif (1, 2):\n print(sys.version)\n"), @r"
626+
.pass_stdin("import os\nimport sys\n\nif (1, 2):\n print(sys.version)\n"), @r###"
627627
success: false
628628
exit_code: 1
629629
----- stdout -----
@@ -636,14 +636,14 @@ fn stdin_fix_when_not_fixable_should_still_print_contents() {
636636
-:3:4: F634 If test is a tuple, which is always `True`
637637
|
638638
1 | import sys
639-
2 |
639+
2 |
640640
3 | if (1, 2):
641641
| ^^^^^^ F634
642642
4 | print(sys.version)
643643
|
644644
645645
Found 2 errors (1 fixed, 1 remaining).
646-
");
646+
"###);
647647
}
648648

649649
#[test]

crates/ruff_linter/src/message/snapshots/ruff_linter__message__text__tests__notebook_output.snap

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
---
22
source: crates/ruff_linter/src/message/text.rs
33
expression: content
4-
snapshot_kind: text
54
---
65
notebook.ipynb:cell 1:2:8: F401 [*] `os` imported but unused
76
|
@@ -16,7 +15,7 @@ notebook.ipynb:cell 2:2:8: F401 [*] `math` imported but unused
1615
1 | # cell 2
1716
2 | import math
1817
| ^^^^ F401
19-
3 |
18+
3 |
2019
4 | print('hello world')
2120
|
2221
= help: Remove unused import: `math`

crates/ruff_linter/src/message/snapshots/ruff_linter__message__text__tests__syntax_errors.snap

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,20 @@
11
---
22
source: crates/ruff_linter/src/message/text.rs
33
expression: content
4-
snapshot_kind: text
54
---
65
syntax_errors.py:1:15: SyntaxError: Expected one or more symbol names after import
76
|
87
1 | from os import
98
| ^
10-
2 |
9+
2 |
1110
3 | if call(foo
1211
4 | def bar():
1312
|
1413

1514
syntax_errors.py:3:12: SyntaxError: Expected ')', found newline
1615
|
1716
1 | from os import
18-
2 |
17+
2 |
1918
3 | if call(foo
2019
| ^
2120
4 | def bar():

crates/ruff_linter/src/rules/airflow/snapshots/ruff_linter__rules__airflow__tests__AIR001_AIR001.py.snap

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ AIR001.py:11:1: AIR001 Task variable name should match the `task_id`: "my_task"
66
10 | my_task = PythonOperator(task_id="my_task", callable=my_callable)
77
11 | incorrect_name = PythonOperator(task_id="my_task") # AIR001
88
| ^^^^^^^^^^^^^^ AIR001
9-
12 |
9+
12 |
1010
13 | my_task = AirbyteTriggerSyncOperator(task_id="my_task", callable=my_callable)
1111
|
1212

@@ -15,7 +15,7 @@ AIR001.py:14:1: AIR001 Task variable name should match the `task_id`: "my_task"
1515
13 | my_task = AirbyteTriggerSyncOperator(task_id="my_task", callable=my_callable)
1616
14 | incorrect_name = AirbyteTriggerSyncOperator(task_id="my_task") # AIR001
1717
| ^^^^^^^^^^^^^^ AIR001
18-
15 |
18+
15 |
1919
16 | my_task = AppflowFlowRunOperator(task_id="my_task", callable=my_callable)
2020
|
2121

@@ -24,6 +24,6 @@ AIR001.py:17:1: AIR001 Task variable name should match the `task_id`: "my_task"
2424
16 | my_task = AppflowFlowRunOperator(task_id="my_task", callable=my_callable)
2525
17 | incorrect_name = AppflowFlowRunOperator(task_id="my_task") # AIR001
2626
| ^^^^^^^^^^^^^^ AIR001
27-
18 |
27+
18 |
2828
19 | # Consider only from the `airflow.operators` (or providers operators) module
2929
|

crates/ruff_linter/src/rules/airflow/snapshots/ruff_linter__rules__airflow__tests__AIR301_AIR301.py.snap

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ source: crates/ruff_linter/src/rules/airflow/mod.rs
44
AIR301.py:4:1: AIR301 DAG should have an explicit `schedule` argument
55
|
66
2 | from airflow.timetables.simple import NullTimetable
7-
3 |
7+
3 |
88
4 | DAG(dag_id="class_default_schedule")
99
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AIR301
10-
5 |
10+
5 |
1111
6 | DAG(dag_id="class_schedule", schedule="@hourly")
1212
|
1313

crates/ruff_linter/src/rules/airflow/snapshots/ruff_linter__rules__airflow__tests__AIR302_AIR302_args.py.snap

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ source: crates/ruff_linter/src/rules/airflow/mod.rs
44
AIR302_args.py:18:39: AIR302 [*] `schedule_interval` is removed in Airflow 3.0
55
|
66
16 | DAG(dag_id="class_schedule", schedule="@hourly")
7-
17 |
7+
17 |
88
18 | DAG(dag_id="class_schedule_interval", schedule_interval="@hourly")
99
| ^^^^^^^^^^^^^^^^^ AIR302
10-
19 |
10+
19 |
1111
20 | DAG(dag_id="class_timetable", timetable=NullTimetable())
1212
|
1313
= help: Use `schedule` instead
@@ -25,7 +25,7 @@ AIR302_args.py:18:39: AIR302 [*] `schedule_interval` is removed in Airflow 3.0
2525
AIR302_args.py:20:31: AIR302 [*] `timetable` is removed in Airflow 3.0
2626
|
2727
18 | DAG(dag_id="class_schedule_interval", schedule_interval="@hourly")
28-
19 |
28+
19 |
2929
20 | DAG(dag_id="class_timetable", timetable=NullTimetable())
3030
| ^^^^^^^^^ AIR302
3131
|
@@ -238,14 +238,14 @@ AIR302_args.py:90:16: AIR302 `filename_template` is removed in Airflow 3.0
238238
89 | ElasticsearchTaskHandler(filename_template="/tmp/test")
239239
90 | GCSTaskHandler(filename_template="/tmp/test")
240240
| ^^^^^^^^^^^^^^^^^ AIR302
241-
91 |
241+
91 |
242242
92 | FabAuthManager(None)
243243
|
244244

245245
AIR302_args.py:92:15: AIR302 `appbuilder` is removed in Airflow 3.0; The constructor takes no parameter now
246246
|
247247
90 | GCSTaskHandler(filename_template="/tmp/test")
248-
91 |
248+
91 |
249249
92 | FabAuthManager(None)
250250
| ^^^^^^ AIR302
251251
|

crates/ruff_linter/src/rules/airflow/snapshots/ruff_linter__rules__airflow__tests__AIR302_AIR302_class_attribute.py.snap

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
---
22
source: crates/ruff_linter/src/rules/airflow/mod.rs
3-
snapshot_kind: text
43
---
54
AIR302_class_attribute.py:13:4: AIR302 `register_dataset_change` is removed in Airflow 3.0
65
|
@@ -50,7 +49,7 @@ AIR302_class_attribute.py:17:4: AIR302 `notify_dataset_alias_created` is removed
5049
16 | dm.notify_dataset_changed()
5150
17 | dm.notify_dataset_alias_created()
5251
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AIR302
53-
18 |
52+
18 |
5453
19 | hlc = HookLineageCollector()
5554
|
5655
= help: Use `notify_asset_alias_created` instead
@@ -92,7 +91,7 @@ AIR302_class_attribute.py:23:5: AIR302 `collected_datasets` is removed in Airflo
9291
22 | hlc.add_output_dataset()
9392
23 | hlc.collected_datasets()
9493
| ^^^^^^^^^^^^^^^^^^ AIR302
95-
24 |
94+
24 |
9695
25 | aam = AwsAuthManager()
9796
|
9897
= help: Use `collected_assets` instead
@@ -102,7 +101,7 @@ AIR302_class_attribute.py:26:5: AIR302 `is_authorized_dataset` is removed in Air
102101
25 | aam = AwsAuthManager()
103102
26 | aam.is_authorized_dataset()
104103
| ^^^^^^^^^^^^^^^^^^^^^ AIR302
105-
27 |
104+
27 |
106105
28 | pm = ProvidersManager()
107106
|
108107
= help: Use `is_authorized_asset` instead
@@ -113,7 +112,7 @@ AIR302_class_attribute.py:30:4: AIR302 `dataset_factories` is removed in Airflow
113112
29 | pm.initialize_providers_asset_uri_resources()
114113
30 | pm.dataset_factories
115114
| ^^^^^^^^^^^^^^^^^ AIR302
116-
31 |
115+
31 |
117116
32 | base_secret_backend = BaseSecretsBackend()
118117
|
119118
= help: Use `asset_factories` instead
@@ -133,7 +132,7 @@ AIR302_class_attribute.py:34:21: AIR302 `get_connections` is removed in Airflow
133132
33 | base_secret_backend.get_conn_uri()
134133
34 | base_secret_backend.get_connections()
135134
| ^^^^^^^^^^^^^^^ AIR302
136-
35 |
135+
35 |
137136
36 | csm_backend = CloudSecretManagerBackend()
138137
|
139138
= help: Use `get_connection` instead
@@ -153,7 +152,7 @@ AIR302_class_attribute.py:38:13: AIR302 `get_connections` is removed in Airflow
153152
37 | csm_backend.get_conn_uri()
154153
38 | csm_backend.get_connections()
155154
| ^^^^^^^^^^^^^^^ AIR302
156-
39 |
155+
39 |
157156
40 | vault_backend = VaultBackend()
158157
|
159158
= help: Use `get_connection` instead
@@ -173,7 +172,7 @@ AIR302_class_attribute.py:42:15: AIR302 `get_connections` is removed in Airflow
173172
41 | vault_backend.get_conn_uri()
174173
42 | vault_backend.get_connections()
175174
| ^^^^^^^^^^^^^^^ AIR302
176-
43 |
175+
43 |
177176
44 | not_an_error = NotAir302SecretError()
178177
|
179178
= help: Use `get_connection` instead
@@ -204,15 +203,15 @@ AIR302_class_attribute.py:56:18: AIR302 `dataset_to_openlineage_converters` is r
204203
55 | provider_manager.dataset_uri_handlers
205204
56 | provider_manager.dataset_to_openlineage_converters
206205
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AIR302
207-
57 |
206+
57 |
208207
58 | dl_info = DatasetLineageInfo()
209208
|
210209
= help: Use `asset_to_openlineage_converters` instead
211210

212211
AIR302_class_attribute.py:58:11: AIR302 `airflow.lineage.hook.DatasetLineageInfo` is removed in Airflow 3.0
213212
|
214213
56 | provider_manager.dataset_to_openlineage_converters
215-
57 |
214+
57 |
216215
58 | dl_info = DatasetLineageInfo()
217216
| ^^^^^^^^^^^^^^^^^^ AIR302
218217
59 | dl_info.dataset

0 commit comments

Comments
 (0)