|
1 | 1 | ---
|
2 | 2 | source: crates/ruff/src/rules/pylint/mod.rs
|
3 | 3 | ---
|
4 |
| -bad_dunder_method_name.py:2:9: PLW3201 Bad or misspelled dunder method name `_init_`. (bad-dunder-name) |
| 4 | +bad_dunder_method_name.py:5:9: PLW3201 Bad or misspelled dunder method name `_init_`. (bad-dunder-name) |
5 | 5 | |
|
6 |
| -1 | class Apples: |
7 |
| -2 | def _init_(self): # [bad-dunder-name] |
| 6 | +4 | class Apples: |
| 7 | +5 | def _init_(self): # [bad-dunder-name] |
8 | 8 | | ^^^^^^ PLW3201
|
9 |
| -3 | pass |
| 9 | +6 | pass |
10 | 10 | |
|
11 | 11 |
|
12 |
| -bad_dunder_method_name.py:5:9: PLW3201 Bad or misspelled dunder method name `__hello__`. (bad-dunder-name) |
| 12 | +bad_dunder_method_name.py:8:9: PLW3201 Bad or misspelled dunder method name `__hello__`. (bad-dunder-name) |
13 | 13 | |
|
14 |
| -3 | pass |
15 |
| -4 | |
16 |
| -5 | def __hello__(self): # [bad-dunder-name] |
| 14 | +6 | pass |
| 15 | +7 | |
| 16 | +8 | def __hello__(self): # [bad-dunder-name] |
17 | 17 | | ^^^^^^^^^ PLW3201
|
18 |
| -6 | print("hello") |
| 18 | +9 | print("hello") |
19 | 19 | |
|
20 | 20 |
|
21 |
| -bad_dunder_method_name.py:8:9: PLW3201 Bad or misspelled dunder method name `__init_`. (bad-dunder-name) |
| 21 | +bad_dunder_method_name.py:11:9: PLW3201 Bad or misspelled dunder method name `__init_`. (bad-dunder-name) |
22 | 22 | |
|
23 |
| - 6 | print("hello") |
24 |
| - 7 | |
25 |
| - 8 | def __init_(self): # [bad-dunder-name] |
| 23 | + 9 | print("hello") |
| 24 | +10 | |
| 25 | +11 | def __init_(self): # [bad-dunder-name] |
26 | 26 | | ^^^^^^^ PLW3201
|
27 |
| - 9 | # author likely unintentionally misspelled the correct init dunder. |
28 |
| -10 | pass |
| 27 | +12 | # author likely unintentionally misspelled the correct init dunder. |
| 28 | +13 | pass |
29 | 29 | |
|
30 | 30 |
|
31 |
| -bad_dunder_method_name.py:12:9: PLW3201 Bad or misspelled dunder method name `_init_`. (bad-dunder-name) |
| 31 | +bad_dunder_method_name.py:15:9: PLW3201 Bad or misspelled dunder method name `_init_`. (bad-dunder-name) |
32 | 32 | |
|
33 |
| -10 | pass |
34 |
| -11 | |
35 |
| -12 | def _init_(self): # [bad-dunder-name] |
| 33 | +13 | pass |
| 34 | +14 | |
| 35 | +15 | def _init_(self): # [bad-dunder-name] |
36 | 36 | | ^^^^^^ PLW3201
|
37 |
| -13 | # author likely unintentionally misspelled the correct init dunder. |
38 |
| -14 | pass |
| 37 | +16 | # author likely unintentionally misspelled the correct init dunder. |
| 38 | +17 | pass |
39 | 39 | |
|
40 | 40 |
|
41 |
| -bad_dunder_method_name.py:16:9: PLW3201 Bad or misspelled dunder method name `___neg__`. (bad-dunder-name) |
| 41 | +bad_dunder_method_name.py:19:9: PLW3201 Bad or misspelled dunder method name `___neg__`. (bad-dunder-name) |
42 | 42 | |
|
43 |
| -14 | pass |
44 |
| -15 | |
45 |
| -16 | def ___neg__(self): # [bad-dunder-name] |
| 43 | +17 | pass |
| 44 | +18 | |
| 45 | +19 | def ___neg__(self): # [bad-dunder-name] |
46 | 46 | | ^^^^^^^^ PLW3201
|
47 |
| -17 | # author likely accidentally added an additional `_` |
48 |
| -18 | pass |
| 47 | +20 | # author likely accidentally added an additional `_` |
| 48 | +21 | pass |
49 | 49 | |
|
50 | 50 |
|
51 |
| -bad_dunder_method_name.py:20:9: PLW3201 Bad or misspelled dunder method name `__inv__`. (bad-dunder-name) |
| 51 | +bad_dunder_method_name.py:23:9: PLW3201 Bad or misspelled dunder method name `__inv__`. (bad-dunder-name) |
52 | 52 | |
|
53 |
| -18 | pass |
54 |
| -19 | |
55 |
| -20 | def __inv__(self): # [bad-dunder-name] |
| 53 | +21 | pass |
| 54 | +22 | |
| 55 | +23 | def __inv__(self): # [bad-dunder-name] |
56 | 56 | | ^^^^^^^ PLW3201
|
57 |
| -21 | # author likely meant to call the invert dunder method |
58 |
| -22 | pass |
| 57 | +24 | # author likely meant to call the invert dunder method |
| 58 | +25 | pass |
59 | 59 | |
|
60 | 60 |
|
61 | 61 |
|
0 commit comments