Skip to content

Commit 3b525a1

Browse files
committed
update snapshots
1 parent 309c326 commit 3b525a1

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

crates/ruff_linter/resources/test/fixtures/refurb/FURB129.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ def func():
5757
pass
5858

5959

60-
# False positives
60+
# Ok
6161
def func(f):
6262
for _line in f.readlines():
6363
pass

crates/ruff_linter/src/rules/refurb/snapshots/ruff_linter__rules__refurb__tests__FURB129_FURB129.py.snap

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ FURB129.py:7:18: FURB129 [*] Instead of calling `readlines()`, iterate over file
1212
|
1313
= help: Remove `readlines()`
1414

15-
Unsafe fix
15+
Safe fix
1616
4 4 |
1717
5 5 | # Errors
1818
6 6 | with open("FURB129.py") as f:
@@ -33,7 +33,7 @@ FURB129.py:9:35: FURB129 [*] Instead of calling `readlines()`, iterate over file
3333
|
3434
= help: Remove `readlines()`
3535

36-
Unsafe fix
36+
Safe fix
3737
6 6 | with open("FURB129.py") as f:
3838
7 7 | for _line in f.readlines():
3939
8 8 | pass
@@ -53,7 +53,7 @@ FURB129.py:10:35: FURB129 [*] Instead of calling `readlines()`, iterate over fil
5353
|
5454
= help: Remove `readlines()`
5555

56-
Unsafe fix
56+
Safe fix
5757
7 7 | for _line in f.readlines():
5858
8 8 | pass
5959
9 9 | a = [line.lower() for line in f.readlines()]
@@ -74,7 +74,7 @@ FURB129.py:11:49: FURB129 [*] Instead of calling `readlines()`, iterate over fil
7474
|
7575
= help: Remove `readlines()`
7676

77-
Unsafe fix
77+
Safe fix
7878
8 8 | pass
7979
9 9 | a = [line.lower() for line in f.readlines()]
8080
10 10 | b = {line.upper() for line in f.readlines()}
@@ -93,7 +93,7 @@ FURB129.py:14:18: FURB129 [*] Instead of calling `readlines()`, iterate over fil
9393
|
9494
= help: Remove `readlines()`
9595

96-
Unsafe fix
96+
Safe fix
9797
11 11 | c = {line.lower(): line.upper() for line in f.readlines()}
9898
12 12 |
9999
13 13 | with Path("FURB129.py").open() as f:
@@ -113,7 +113,7 @@ FURB129.py:17:14: FURB129 [*] Instead of calling `readlines()`, iterate over fil
113113
|
114114
= help: Remove `readlines()`
115115

116-
Unsafe fix
116+
Safe fix
117117
14 14 | for _line in f.readlines():
118118
15 15 | pass
119119
16 16 |
@@ -133,7 +133,7 @@ FURB129.py:20:14: FURB129 [*] Instead of calling `readlines()`, iterate over fil
133133
|
134134
= help: Remove `readlines()`
135135

136-
Unsafe fix
136+
Safe fix
137137
17 17 | for _line in open("FURB129.py").readlines():
138138
18 18 | pass
139139
19 19 |
@@ -154,7 +154,7 @@ FURB129.py:26:18: FURB129 [*] Instead of calling `readlines()`, iterate over fil
154154
|
155155
= help: Remove `readlines()`
156156

157-
Unsafe fix
157+
Safe fix
158158
23 23 |
159159
24 24 | def func():
160160
25 25 | f = Path("FURB129.py").open()
@@ -173,7 +173,7 @@ FURB129.py:32:18: FURB129 [*] Instead of calling `readlines()`, iterate over fil
173173
|
174174
= help: Remove `readlines()`
175175

176-
Unsafe fix
176+
Safe fix
177177
29 29 |
178178
30 30 |
179179
31 31 | def func(f: io.BytesIO):
@@ -194,7 +194,7 @@ FURB129.py:38:22: FURB129 [*] Instead of calling `readlines()`, iterate over fil
194194
|
195195
= help: Remove `readlines()`
196196

197-
Unsafe fix
197+
Safe fix
198198
35 35 |
199199
36 36 | def func():
200200
37 37 | with (open("FURB129.py") as f, foo as bar):
@@ -213,7 +213,7 @@ FURB129.py:48:17: FURB129 [*] Instead of calling `readlines()`, iterate over fil
213213
|
214214
= help: Remove `readlines()`
215215

216-
Unsafe fix
216+
Safe fix
217217
45 45 |
218218
46 46 |
219219
47 47 | with builtins.open("FURB129.py") as f:
@@ -232,7 +232,7 @@ FURB129.py:56:17: FURB129 [*] Instead of calling `readlines()`, iterate over fil
232232
|
233233
= help: Remove `readlines()`
234234

235-
Unsafe fix
235+
Safe fix
236236
53 53 |
237237
54 54 |
238238
55 55 | with o("FURB129.py") as f:

0 commit comments

Comments
 (0)