Skip to content

Commit

Permalink
Update snapshots to reflect changes in fix messages
Browse files Browse the repository at this point in the history
  • Loading branch information
zanieb committed Oct 3, 2023
1 parent 9949fa0 commit ee903bf
Show file tree
Hide file tree
Showing 209 changed files with 1,591 additions and 1,591 deletions.
8 changes: 4 additions & 4 deletions crates/ruff_cli/tests/lint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ inline-quotes = "single"
-:1:5: B005 Using `.strip()` with multi-character strings is misleading
-:1:19: Q000 [*] Double quotes found but single quotes preferred
Found 3 errors.
[*] 2 potentially fixable with the --fix option.
[*] 2 fixable with the --fix option.
----- stderr -----
"###);
Expand Down Expand Up @@ -75,7 +75,7 @@ inline-quotes = "single"
-:1:5: B005 Using `.strip()` with multi-character strings is misleading
-:1:19: Q000 [*] Double quotes found but single quotes preferred
Found 3 errors.
[*] 2 potentially fixable with the --fix option.
[*] 2 fixable with the --fix option.
----- stderr -----
"###);
Expand Down Expand Up @@ -110,7 +110,7 @@ inline-quotes = "single"
-:1:5: B005 Using `.strip()` with multi-character strings is misleading
-:1:19: Q000 [*] Double quotes found but single quotes preferred
Found 3 errors.
[*] 2 potentially fixable with the --fix option.
[*] 2 fixable with the --fix option.
----- stderr -----
"###);
Expand Down Expand Up @@ -149,7 +149,7 @@ inline-quotes = "single"
-:1:5: B005 Using `.strip()` with multi-character strings is misleading
-:1:19: Q000 [*] Double quotes found but single quotes preferred
Found 3 errors.
[*] 2 potentially fixable with the --fix option.
[*] 2 fixable with the --fix option.
----- stderr -----
"###);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ source: crates/ruff_linter/src/message/grouped.rs
expression: content
---
fib.py:
1:8 F401 [*] `os` imported but unused
1:8 F401 [**] `os` imported but unused
|
1 | import os
| ^^ F401
|
= help: Remove unused import: `os`

6:5 F841 [*] Local variable `x` is assigned to but never used
6:5 F841 [**] Local variable `x` is assigned to but never used
|
4 | def fibonacci(n):
5 | """Compute the nth number in the Fibonacci sequence."""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
source: crates/ruff_linter/src/message/text.rs
expression: content
---
fib.py:1:8: F401 [*] `os` imported but unused
fib.py:1:8: F401 [**] `os` imported but unused
|
1 | import os
| ^^ F401
|
= help: Remove unused import: `os`

fib.py:6:5: F841 [*] Local variable `x` is assigned to but never used
fib.py:6:5: F841 [**] Local variable `x` is assigned to but never used
|
4 | def fibonacci(n):
5 | """Compute the nth number in the Fibonacci sequence."""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ annotation_presence.py:154:10: ANN401 Dynamically typed expressions (typing.Any)
| ^^^^^^^^^^^^^^^^^^^^^^^^ ANN401
|

annotation_presence.py:159:9: ANN204 [*] Missing return type annotation for special method `__init__`
annotation_presence.py:159:9: ANN204 [**] Missing return type annotation for special method `__init__`
|
157 | class Foo:
158 | @decorator()
Expand All @@ -262,7 +262,7 @@ annotation_presence.py:159:9: ANN204 [*] Missing return type annotation for spec
161 161 |
162 162 |

annotation_presence.py:165:9: ANN204 [*] Missing return type annotation for special method `__init__`
annotation_presence.py:165:9: ANN204 [**] Missing return type annotation for special method `__init__`
|
163 | # Regression test for: https://github.com/astral-sh/ruff/issues/7711
164 | class Class:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
source: crates/ruff_linter/src/rules/flake8_annotations/mod.rs
---
mypy_init_return.py:5:9: ANN204 [*] Missing return type annotation for special method `__init__`
mypy_init_return.py:5:9: ANN204 [**] Missing return type annotation for special method `__init__`
|
3 | # Error
4 | class Foo:
Expand All @@ -21,7 +21,7 @@ mypy_init_return.py:5:9: ANN204 [*] Missing return type annotation for special m
7 7 |
8 8 |

mypy_init_return.py:11:9: ANN204 [*] Missing return type annotation for special method `__init__`
mypy_init_return.py:11:9: ANN204 [**] Missing return type annotation for special method `__init__`
|
9 | # Error
10 | class Foo:
Expand Down Expand Up @@ -49,7 +49,7 @@ mypy_init_return.py:40:5: ANN202 Missing return type annotation for private func
41 | ...
|

mypy_init_return.py:47:9: ANN204 [*] Missing return type annotation for special method `__init__`
mypy_init_return.py:47:9: ANN204 [**] Missing return type annotation for special method `__init__`
|
45 | # of a vararg falsely indicated that the function has a typed argument.
46 | class Foo:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
source: crates/ruff_linter/src/rules/flake8_annotations/mod.rs
---
simple_magic_methods.py:2:9: ANN204 [*] Missing return type annotation for special method `__str__`
simple_magic_methods.py:2:9: ANN204 [**] Missing return type annotation for special method `__str__`
|
1 | class Foo:
2 | def __str__(self):
Expand All @@ -18,7 +18,7 @@ simple_magic_methods.py:2:9: ANN204 [*] Missing return type annotation for speci
4 4 |
5 5 | def __repr__(self):

simple_magic_methods.py:5:9: ANN204 [*] Missing return type annotation for special method `__repr__`
simple_magic_methods.py:5:9: ANN204 [**] Missing return type annotation for special method `__repr__`
|
3 | ...
4 |
Expand All @@ -38,7 +38,7 @@ simple_magic_methods.py:5:9: ANN204 [*] Missing return type annotation for speci
7 7 |
8 8 | def __len__(self):

simple_magic_methods.py:8:9: ANN204 [*] Missing return type annotation for special method `__len__`
simple_magic_methods.py:8:9: ANN204 [**] Missing return type annotation for special method `__len__`
|
6 | ...
7 |
Expand All @@ -58,7 +58,7 @@ simple_magic_methods.py:8:9: ANN204 [*] Missing return type annotation for speci
10 10 |
11 11 | def __length_hint__(self):

simple_magic_methods.py:11:9: ANN204 [*] Missing return type annotation for special method `__length_hint__`
simple_magic_methods.py:11:9: ANN204 [**] Missing return type annotation for special method `__length_hint__`
|
9 | ...
10 |
Expand All @@ -78,7 +78,7 @@ simple_magic_methods.py:11:9: ANN204 [*] Missing return type annotation for spec
13 13 |
14 14 | def __init__(self):

simple_magic_methods.py:14:9: ANN204 [*] Missing return type annotation for special method `__init__`
simple_magic_methods.py:14:9: ANN204 [**] Missing return type annotation for special method `__init__`
|
12 | ...
13 |
Expand All @@ -98,7 +98,7 @@ simple_magic_methods.py:14:9: ANN204 [*] Missing return type annotation for spec
16 16 |
17 17 | def __del__(self):

simple_magic_methods.py:17:9: ANN204 [*] Missing return type annotation for special method `__del__`
simple_magic_methods.py:17:9: ANN204 [**] Missing return type annotation for special method `__del__`
|
15 | ...
16 |
Expand All @@ -118,7 +118,7 @@ simple_magic_methods.py:17:9: ANN204 [*] Missing return type annotation for spec
19 19 |
20 20 | def __bool__(self):

simple_magic_methods.py:20:9: ANN204 [*] Missing return type annotation for special method `__bool__`
simple_magic_methods.py:20:9: ANN204 [**] Missing return type annotation for special method `__bool__`
|
18 | ...
19 |
Expand All @@ -138,7 +138,7 @@ simple_magic_methods.py:20:9: ANN204 [*] Missing return type annotation for spec
22 22 |
23 23 | def __bytes__(self):

simple_magic_methods.py:23:9: ANN204 [*] Missing return type annotation for special method `__bytes__`
simple_magic_methods.py:23:9: ANN204 [**] Missing return type annotation for special method `__bytes__`
|
21 | ...
22 |
Expand All @@ -158,7 +158,7 @@ simple_magic_methods.py:23:9: ANN204 [*] Missing return type annotation for spec
25 25 |
26 26 | def __format__(self, format_spec):

simple_magic_methods.py:26:9: ANN204 [*] Missing return type annotation for special method `__format__`
simple_magic_methods.py:26:9: ANN204 [**] Missing return type annotation for special method `__format__`
|
24 | ...
25 |
Expand All @@ -178,7 +178,7 @@ simple_magic_methods.py:26:9: ANN204 [*] Missing return type annotation for spec
28 28 |
29 29 | def __contains__(self, item):

simple_magic_methods.py:29:9: ANN204 [*] Missing return type annotation for special method `__contains__`
simple_magic_methods.py:29:9: ANN204 [**] Missing return type annotation for special method `__contains__`
|
27 | ...
28 |
Expand All @@ -198,7 +198,7 @@ simple_magic_methods.py:29:9: ANN204 [*] Missing return type annotation for spec
31 31 |
32 32 | def __complex__(self):

simple_magic_methods.py:32:9: ANN204 [*] Missing return type annotation for special method `__complex__`
simple_magic_methods.py:32:9: ANN204 [**] Missing return type annotation for special method `__complex__`
|
30 | ...
31 |
Expand All @@ -218,7 +218,7 @@ simple_magic_methods.py:32:9: ANN204 [*] Missing return type annotation for spec
34 34 |
35 35 | def __int__(self):

simple_magic_methods.py:35:9: ANN204 [*] Missing return type annotation for special method `__int__`
simple_magic_methods.py:35:9: ANN204 [**] Missing return type annotation for special method `__int__`
|
33 | ...
34 |
Expand All @@ -238,7 +238,7 @@ simple_magic_methods.py:35:9: ANN204 [*] Missing return type annotation for spec
37 37 |
38 38 | def __float__(self):

simple_magic_methods.py:38:9: ANN204 [*] Missing return type annotation for special method `__float__`
simple_magic_methods.py:38:9: ANN204 [**] Missing return type annotation for special method `__float__`
|
36 | ...
37 |
Expand All @@ -258,7 +258,7 @@ simple_magic_methods.py:38:9: ANN204 [*] Missing return type annotation for spec
40 40 |
41 41 | def __index__(self):

simple_magic_methods.py:41:9: ANN204 [*] Missing return type annotation for special method `__index__`
simple_magic_methods.py:41:9: ANN204 [**] Missing return type annotation for special method `__index__`
|
39 | ...
40 |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ B007.py:6:5: B007 Loop control variable `i` not used within loop body
|
= help: Rename unused `i` to `_i`

B007.py:18:13: B007 [*] Loop control variable `k` not used within loop body
B007.py:18:13: B007 [**] Loop control variable `k` not used within loop body
|
16 | for i in range(10):
17 | for j in range(10):
Expand Down Expand Up @@ -39,7 +39,7 @@ B007.py:30:5: B007 Loop control variable `i` not used within loop body
|
= help: Rename unused `i` to `_i`

B007.py:30:13: B007 [*] Loop control variable `k` not used within loop body
B007.py:30:13: B007 [**] Loop control variable `k` not used within loop body
|
30 | for i, (j, (k, l)) in strange_generator(): # i, k not used
| ^ B007
Expand Down Expand Up @@ -99,7 +99,7 @@ B007.py:46:10: B007 Loop control variable `bar` may not be used within loop body
|
= help: Rename unused `bar` to `_bar`

B007.py:52:14: B007 [*] Loop control variable `bar` not used within loop body
B007.py:52:14: B007 [**] Loop control variable `bar` not used within loop body
|
50 | def f():
51 | # Fixable.
Expand Down Expand Up @@ -131,7 +131,7 @@ B007.py:59:14: B007 Loop control variable `bar` not used within loop body
|
= help: Rename unused `bar` to `_bar`

B007.py:68:14: B007 [*] Loop control variable `bar` not used within loop body
B007.py:68:14: B007 [**] Loop control variable `bar` not used within loop body
|
66 | def f():
67 | # Fixable.
Expand Down
Loading

0 comments on commit ee903bf

Please sign in to comment.