|
1 | 1 | --- |
2 | 2 | source: crates/ruff_linter/src/rules/pylint/mod.rs |
3 | 3 | --- |
4 | | -redefined_argument_from_local.py:26:9: PLR1704 Redefining argument with the local name `a` |
| 4 | +redefined_argument_from_local.py:31:9: PLR1704 Redefining argument with the local name `a` |
5 | 5 | | |
6 | | -24 | # Errors |
7 | | -25 | def func(a): |
8 | | -26 | for a in range(1): |
| 6 | +29 | # Errors |
| 7 | +30 | def func(a): |
| 8 | +31 | for a in range(1): |
9 | 9 | | ^ PLR1704 |
10 | | -27 | ... |
| 10 | +32 | ... |
11 | 11 | | |
12 | 12 |
|
13 | | -redefined_argument_from_local.py:31:9: PLR1704 Redefining argument with the local name `i` |
| 13 | +redefined_argument_from_local.py:36:9: PLR1704 Redefining argument with the local name `i` |
14 | 14 | | |
15 | | -30 | def func(i): |
16 | | -31 | for i in range(10): |
| 15 | +35 | def func(i): |
| 16 | +36 | for i in range(10): |
17 | 17 | | ^ PLR1704 |
18 | | -32 | print(i) |
| 18 | +37 | print(i) |
19 | 19 | | |
20 | 20 |
|
21 | | -redefined_argument_from_local.py:38:25: PLR1704 Redefining argument with the local name `e` |
| 21 | +redefined_argument_from_local.py:43:25: PLR1704 Redefining argument with the local name `e` |
22 | 22 | | |
23 | | -36 | try: |
24 | | -37 | ... |
25 | | -38 | except Exception as e: |
| 23 | +41 | try: |
| 24 | +42 | ... |
| 25 | +43 | except Exception as e: |
26 | 26 | | ^ PLR1704 |
27 | | -39 | print(e) |
| 27 | +44 | print(e) |
28 | 28 | | |
29 | 29 |
|
30 | | -redefined_argument_from_local.py:43:24: PLR1704 Redefining argument with the local name `f` |
| 30 | +redefined_argument_from_local.py:48:24: PLR1704 Redefining argument with the local name `f` |
31 | 31 | | |
32 | | -42 | def func(f): |
33 | | -43 | with open('', ) as f: |
| 32 | +47 | def func(f): |
| 33 | +48 | with open('', ) as f: |
34 | 34 | | ^ PLR1704 |
35 | | -44 | print(f) |
| 35 | +49 | print(f) |
36 | 36 | | |
37 | 37 |
|
38 | | -redefined_argument_from_local.py:48:24: PLR1704 Redefining argument with the local name `a` |
| 38 | +redefined_argument_from_local.py:53:24: PLR1704 Redefining argument with the local name `a` |
39 | 39 | | |
40 | | -47 | def func(a, b): |
41 | | -48 | with context() as (a, b, c): |
| 40 | +52 | def func(a, b): |
| 41 | +53 | with context() as (a, b, c): |
42 | 42 | | ^ PLR1704 |
43 | | -49 | print(a, b, c) |
| 43 | +54 | print(a, b, c) |
44 | 44 | | |
45 | 45 |
|
46 | | -redefined_argument_from_local.py:48:27: PLR1704 Redefining argument with the local name `b` |
| 46 | +redefined_argument_from_local.py:53:27: PLR1704 Redefining argument with the local name `b` |
47 | 47 | | |
48 | | -47 | def func(a, b): |
49 | | -48 | with context() as (a, b, c): |
| 48 | +52 | def func(a, b): |
| 49 | +53 | with context() as (a, b, c): |
50 | 50 | | ^ PLR1704 |
51 | | -49 | print(a, b, c) |
| 51 | +54 | print(a, b, c) |
52 | 52 | | |
53 | 53 |
|
54 | | -redefined_argument_from_local.py:53:24: PLR1704 Redefining argument with the local name `a` |
| 54 | +redefined_argument_from_local.py:58:24: PLR1704 Redefining argument with the local name `a` |
55 | 55 | | |
56 | | -52 | def func(a, b): |
57 | | -53 | with context() as [a, b, c]: |
| 56 | +57 | def func(a, b): |
| 57 | +58 | with context() as [a, b, c]: |
58 | 58 | | ^ PLR1704 |
59 | | -54 | print(a, b, c) |
| 59 | +59 | print(a, b, c) |
60 | 60 | | |
61 | 61 |
|
62 | | -redefined_argument_from_local.py:53:27: PLR1704 Redefining argument with the local name `b` |
| 62 | +redefined_argument_from_local.py:58:27: PLR1704 Redefining argument with the local name `b` |
63 | 63 | | |
64 | | -52 | def func(a, b): |
65 | | -53 | with context() as [a, b, c]: |
| 64 | +57 | def func(a, b): |
| 65 | +58 | with context() as [a, b, c]: |
66 | 66 | | ^ PLR1704 |
67 | | -54 | print(a, b, c) |
| 67 | +59 | print(a, b, c) |
68 | 68 | | |
69 | 69 |
|
70 | | -redefined_argument_from_local.py:58:51: PLR1704 Redefining argument with the local name `a` |
| 70 | +redefined_argument_from_local.py:63:51: PLR1704 Redefining argument with the local name `a` |
71 | 71 | | |
72 | | -57 | def func(a): |
73 | | -58 | with open('foo.py', ) as f, open('bar.py') as a: |
| 72 | +62 | def func(a): |
| 73 | +63 | with open('foo.py', ) as f, open('bar.py') as a: |
74 | 74 | | ^ PLR1704 |
75 | | -59 | ... |
| 75 | +64 | ... |
76 | 76 | | |
77 | 77 |
|
78 | | -redefined_argument_from_local.py:64:13: PLR1704 Redefining argument with the local name `a` |
| 78 | +redefined_argument_from_local.py:69:13: PLR1704 Redefining argument with the local name `a` |
79 | 79 | | |
80 | | -62 | def func(a): |
81 | | -63 | def bar(b): |
82 | | -64 | for a in range(1): |
| 80 | +67 | def func(a): |
| 81 | +68 | def bar(b): |
| 82 | +69 | for a in range(1): |
83 | 83 | | ^ PLR1704 |
84 | | -65 | print(a) |
| 84 | +70 | print(a) |
85 | 85 | | |
86 | 86 |
|
87 | | -redefined_argument_from_local.py:70:13: PLR1704 Redefining argument with the local name `b` |
| 87 | +redefined_argument_from_local.py:75:13: PLR1704 Redefining argument with the local name `b` |
88 | 88 | | |
89 | | -68 | def func(a): |
90 | | -69 | def bar(b): |
91 | | -70 | for b in range(1): |
| 89 | +73 | def func(a): |
| 90 | +74 | def bar(b): |
| 91 | +75 | for b in range(1): |
92 | 92 | | ^ PLR1704 |
93 | | -71 | print(b) |
| 93 | +76 | print(b) |
94 | 94 | | |
95 | 95 |
|
96 | | -redefined_argument_from_local.py:76:13: PLR1704 Redefining argument with the local name `a` |
| 96 | +redefined_argument_from_local.py:81:13: PLR1704 Redefining argument with the local name `a` |
97 | 97 | | |
98 | | -74 | def func(a=1): |
99 | | -75 | def bar(b=2): |
100 | | -76 | for a in range(1): |
| 98 | +79 | def func(a=1): |
| 99 | +80 | def bar(b=2): |
| 100 | +81 | for a in range(1): |
101 | 101 | | ^ PLR1704 |
102 | | -77 | print(a) |
103 | | -78 | for b in range(1): |
| 102 | +82 | print(a) |
| 103 | +83 | for b in range(1): |
104 | 104 | | |
105 | 105 |
|
106 | | -redefined_argument_from_local.py:78:13: PLR1704 Redefining argument with the local name `b` |
| 106 | +redefined_argument_from_local.py:83:13: PLR1704 Redefining argument with the local name `b` |
107 | 107 | | |
108 | | -76 | for a in range(1): |
109 | | -77 | print(a) |
110 | | -78 | for b in range(1): |
| 108 | +81 | for a in range(1): |
| 109 | +82 | print(a) |
| 110 | +83 | for b in range(1): |
111 | 111 | | ^ PLR1704 |
112 | | -79 | print(b) |
| 112 | +84 | print(b) |
113 | 113 | | |
114 | | - |
115 | | - |
0 commit comments