-
Notifications
You must be signed in to change notification settings - Fork 903
/
ruff_linter__rules__refurb__tests__FURB110_FURB110.py.snap
150 lines (139 loc) · 2.92 KB
/
ruff_linter__rules__refurb__tests__FURB110_FURB110.py.snap
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
---
source: crates/ruff_linter/src/rules/refurb/mod.rs
---
FURB110.py:1:5: FURB110 [*] Replace ternary `if` expression with `or` operator
|
1 | z = x if x else y # FURB110
| ^^^^^^^^^^^^^ FURB110
2 |
3 | z = x \
|
= help: Replace with `or` operator
ℹ Safe fix
1 |-z = x if x else y # FURB110
1 |+z = x or y # FURB110
2 2 |
3 3 | z = x \
4 4 | if x else y # FURB110
FURB110.py:3:5: FURB110 [*] Replace ternary `if` expression with `or` operator
|
1 | z = x if x else y # FURB110
2 |
3 | z = x \
| _____^
4 | | if x else y # FURB110
| |_______________^ FURB110
5 |
6 | z = x if x \
|
= help: Replace with `or` operator
ℹ Safe fix
1 1 | z = x if x else y # FURB110
2 2 |
3 |-z = x \
4 |- if x else y # FURB110
3 |+z = x or y # FURB110
5 4 |
6 5 | z = x if x \
7 6 | else \
FURB110.py:6:5: FURB110 [*] Replace ternary `if` expression with `or` operator
|
4 | if x else y # FURB110
5 |
6 | z = x if x \
| _____^
7 | | else \
8 | | y # FURB110
| |_________^ FURB110
9 |
10 | z = x() if x() else y() # FURB110
|
= help: Replace with `or` operator
ℹ Safe fix
3 3 | z = x \
4 4 | if x else y # FURB110
5 5 |
6 |-z = x if x \
7 |- else \
8 |- y # FURB110
6 |+z = x or y # FURB110
9 7 |
10 8 | z = x() if x() else y() # FURB110
11 9 |
FURB110.py:10:5: FURB110 [*] Replace ternary `if` expression with `or` operator
|
8 | y # FURB110
9 |
10 | z = x() if x() else y() # FURB110
| ^^^^^^^^^^^^^^^^^^^ FURB110
11 |
12 | # FURB110
|
= help: Replace with `or` operator
ℹ Unsafe fix
7 7 | else \
8 8 | y # FURB110
9 9 |
10 |-z = x() if x() else y() # FURB110
10 |+z = x() or y() # FURB110
11 11 |
12 12 | # FURB110
13 13 | z = x if (
FURB110.py:13:5: FURB110 [*] Replace ternary `if` expression with `or` operator
|
12 | # FURB110
13 | z = x if (
| _____^
14 | | # Test for x.
15 | | x
16 | | ) else (
17 | | # Test for y.
18 | | y
19 | | )
| |_^ FURB110
20 |
21 | # FURB110
|
= help: Replace with `or` operator
ℹ Safe fix
10 10 | z = x() if x() else y() # FURB110
11 11 |
12 12 | # FURB110
13 |-z = x if (
13 |+z = (
14 14 | # Test for x.
15 15 | x
16 |-) else (
16 |+) or (
17 17 | # Test for y.
18 18 | y
19 19 | )
FURB110.py:23:5: FURB110 [*] Replace ternary `if` expression with `or` operator
|
21 | # FURB110
22 | z = (
23 | x if (
| _____^
24 | | # Test for x.
25 | | x
26 | | ) else (
27 | | # Test for y.
28 | | y
29 | | )
| |_____^ FURB110
30 | )
|
= help: Replace with `or` operator
ℹ Safe fix
20 20 |
21 21 | # FURB110
22 22 | z = (
23 |- x if (
23 |+ (
24 24 | # Test for x.
25 25 | x
26 |- ) else (
26 |+ ) or (
27 27 | # Test for y.
28 28 | y
29 29 | )