@@ -40,7 +40,7 @@ PYI055.pyi:5:4: PYI055 [*] Multiple `type` members in a union. Combine them into
40
40
5 | + t : type [int | str | float ]
41
41
6 6 | u : builtins .type [int ] | type [str ] | builtins .type [complex ]
42
42
7 7 | v : Union [type [float ], type [complex ]]
43
- 8 8 | w : Union [type [float , int ], type [complex ]]
43
+ 8 8 | w : Union [type [Union [ float , int ] ], type [complex ]]
44
44
45
45
PYI055 .pyi :6 :4 : PYI055 [* ] Multiple ` type` members in a union . Combine them into one , e .g ., ` type[int | str | complex]` .
46
46
|
@@ -49,7 +49,7 @@ PYI055.pyi:6:4: PYI055 [*] Multiple `type` members in a union. Combine them into
49
49
6 | u : builtins .type [int ] | type [str ] | builtins .type [complex ]
50
50
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ PYI055
51
51
7 | v : Union [type [float ], type [complex ]]
52
- 8 | w : Union [type [float , int ], type [complex ]]
52
+ 8 | w : Union [type [Union [ float , int ] ], type [complex ]]
53
53
|
54
54
= help : Combine multiple ` type` members
55
55
@@ -60,17 +60,17 @@ PYI055.pyi:6:4: PYI055 [*] Multiple `type` members in a union. Combine them into
60
60
6 | - u : builtins .type [int ] | type [str ] | builtins .type [complex ]
61
61
6 | + u : type [int | str | complex ]
62
62
7 7 | v : Union [type [float ], type [complex ]]
63
- 8 8 | w : Union [type [float , int ], type [complex ]]
64
- 9 9 | x : Union [Union [type [float , int ], type [complex ]]]
63
+ 8 8 | w : Union [type [Union [ float , int ] ], type [complex ]]
64
+ 9 9 | x : Union [Union [type [Union [ float , int ] ], type [complex ]]]
65
65
66
66
PYI055 .pyi :7 :4 : PYI055 [* ] Multiple ` type` members in a union . Combine them into one , e .g ., ` type[Union[float, complex]]` .
67
67
|
68
68
5 | t : type [int ] | type [str ] | type [float ]
69
69
6 | u : builtins .type [int ] | type [str ] | builtins .type [complex ]
70
70
7 | v : Union [type [float ], type [complex ]]
71
71
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ PYI055
72
- 8 | w : Union [type [float , int ], type [complex ]]
73
- 9 | x : Union [Union [type [float , int ], type [complex ]]]
72
+ 8 | w : Union [type [Union [ float , int ] ], type [complex ]]
73
+ 9 | x : Union [Union [type [Union [ float , int ] ], type [complex ]]]
74
74
|
75
75
= help : Combine multiple ` type` members
76
76
@@ -80,96 +80,96 @@ PYI055.pyi:7:4: PYI055 [*] Multiple `type` members in a union. Combine them into
80
80
6 6 | u : builtins .type [int ] | type [str ] | builtins .type [complex ]
81
81
7 | - v : Union [type [float ], type [complex ]]
82
82
7 | + v : type [Union [float , complex ]]
83
- 8 8 | w : Union [type [float , int ], type [complex ]]
84
- 9 9 | x : Union [Union [type [float , int ], type [complex ]]]
85
- 10 10 | y : Union [Union [Union [type [float , int ], type [complex ]]]]
83
+ 8 8 | w : Union [type [Union [ float , int ] ], type [complex ]]
84
+ 9 9 | x : Union [Union [type [Union [ float , int ] ], type [complex ]]]
85
+ 10 10 | y : Union [Union [Union [type [Union [ float , int ] ], type [complex ]]]]
86
86
87
- PYI055 .pyi :8 :4 : PYI055 [* ] Multiple ` type` members in a union . Combine them into one , e .g ., ` type[Union[float, int, complex]]` .
87
+ PYI055 .pyi :8 :4 : PYI055 [* ] Multiple ` type` members in a union . Combine them into one , e .g ., ` type[Union[Union[ float, int] , complex]]` .
88
88
|
89
89
6 | u : builtins .type [int ] | type [str ] | builtins .type [complex ]
90
90
7 | v : Union [type [float ], type [complex ]]
91
- 8 | w : Union [type [float , int ], type [complex ]]
92
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ PYI055
93
- 9 | x : Union [Union [type [float , int ], type [complex ]]]
94
- 10 | y : Union [Union [Union [type [float , int ], type [complex ]]]]
91
+ 8 | w : Union [type [Union [ float , int ] ], type [complex ]]
92
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ PYI055
93
+ 9 | x : Union [Union [type [Union [ float , int ] ], type [complex ]]]
94
+ 10 | y : Union [Union [Union [type [Union [ float , int ] ], type [complex ]]]]
95
95
|
96
96
= help : Combine multiple ` type` members
97
97
98
98
ℹ Safe fix
99
99
5 5 | t : type [int ] | type [str ] | type [float ]
100
100
6 6 | u : builtins .type [int ] | type [str ] | builtins .type [complex ]
101
101
7 7 | v : Union [type [float ], type [complex ]]
102
- 8 | - w : Union [type [float , int ], type [complex ]]
103
- 8 | + w : type [Union [float , int , complex ]]
104
- 9 9 | x : Union [Union [type [float , int ], type [complex ]]]
105
- 10 10 | y : Union [Union [Union [type [float , int ], type [complex ]]]]
106
- 11 11 | z : Union [type [complex ], Union [Union [type [float , int ]]]]
102
+ 8 | - w : Union [type [Union [ float , int ] ], type [complex ]]
103
+ 8 | + w : type [Union [Union [ float , int ] , complex ]]
104
+ 9 9 | x : Union [Union [type [Union [ float , int ] ], type [complex ]]]
105
+ 10 10 | y : Union [Union [Union [type [Union [ float , int ] ], type [complex ]]]]
106
+ 11 11 | z : Union [type [complex ], Union [Union [type [Union [ float , int ] ]]]]
107
107
108
- PYI055 .pyi :9 :4 : PYI055 [* ] Multiple ` type` members in a union . Combine them into one , e .g ., ` type[Union[float, int, complex]]` .
108
+ PYI055 .pyi :9 :4 : PYI055 [* ] Multiple ` type` members in a union . Combine them into one , e .g ., ` type[Union[Union[ float, int] , complex]]` .
109
109
|
110
110
7 | v : Union [type [float ], type [complex ]]
111
- 8 | w : Union [type [float , int ], type [complex ]]
112
- 9 | x : Union [Union [type [float , int ], type [complex ]]]
113
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ PYI055
114
- 10 | y : Union [Union [Union [type [float , int ], type [complex ]]]]
115
- 11 | z : Union [type [complex ], Union [Union [type [float , int ]]]]
111
+ 8 | w : Union [type [Union [ float , int ] ], type [complex ]]
112
+ 9 | x : Union [Union [type [Union [ float , int ] ], type [complex ]]]
113
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ PYI055
114
+ 10 | y : Union [Union [Union [type [Union [ float , int ] ], type [complex ]]]]
115
+ 11 | z : Union [type [complex ], Union [Union [type [Union [ float , int ] ]]]]
116
116
|
117
117
= help : Combine multiple ` type` members
118
118
119
119
ℹ Safe fix
120
120
6 6 | u : builtins .type [int ] | type [str ] | builtins .type [complex ]
121
121
7 7 | v : Union [type [float ], type [complex ]]
122
- 8 8 | w : Union [type [float , int ], type [complex ]]
123
- 9 | - x : Union [Union [type [float , int ], type [complex ]]]
124
- 9 | + x : type [Union [float , int , complex ]]
125
- 10 10 | y : Union [Union [Union [type [float , int ], type [complex ]]]]
126
- 11 11 | z : Union [type [complex ], Union [Union [type [float , int ]]]]
122
+ 8 8 | w : Union [type [Union [ float , int ] ], type [complex ]]
123
+ 9 | - x : Union [Union [type [Union [ float , int ] ], type [complex ]]]
124
+ 9 | + x : type [Union [Union [ float , int ] , complex ]]
125
+ 10 10 | y : Union [Union [Union [type [Union [ float , int ] ], type [complex ]]]]
126
+ 11 11 | z : Union [type [complex ], Union [Union [type [Union [ float , int ] ]]]]
127
127
12 12 |
128
128
129
- PYI055 .pyi :10 :4 : PYI055 [* ] Multiple ` type` members in a union . Combine them into one , e .g ., ` type[Union[float, int, complex]]` .
129
+ PYI055 .pyi :10 :4 : PYI055 [* ] Multiple ` type` members in a union . Combine them into one , e .g ., ` type[Union[Union[ float, int] , complex]]` .
130
130
|
131
- 8 | w : Union [type [float , int ], type [complex ]]
132
- 9 | x : Union [Union [type [float , int ], type [complex ]]]
133
- 10 | y : Union [Union [Union [type [float , int ], type [complex ]]]]
134
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ PYI055
135
- 11 | z : Union [type [complex ], Union [Union [type [float , int ]]]]
131
+ 8 | w : Union [type [Union [ float , int ] ], type [complex ]]
132
+ 9 | x : Union [Union [type [Union [ float , int ] ], type [complex ]]]
133
+ 10 | y : Union [Union [Union [type [Union [ float , int ] ], type [complex ]]]]
134
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ PYI055
135
+ 11 | z : Union [type [complex ], Union [Union [type [Union [ float , int ] ]]]]
136
136
|
137
137
= help : Combine multiple ` type` members
138
138
139
139
ℹ Safe fix
140
140
7 7 | v : Union [type [float ], type [complex ]]
141
- 8 8 | w : Union [type [float , int ], type [complex ]]
142
- 9 9 | x : Union [Union [type [float , int ], type [complex ]]]
143
- 10 | - y : Union [Union [Union [type [float , int ], type [complex ]]]]
144
- 10 | + y : type [Union [float , int , complex ]]
145
- 11 11 | z : Union [type [complex ], Union [Union [type [float , int ]]]]
141
+ 8 8 | w : Union [type [Union [ float , int ] ], type [complex ]]
142
+ 9 9 | x : Union [Union [type [Union [ float , int ] ], type [complex ]]]
143
+ 10 | - y : Union [Union [Union [type [Union [ float , int ] ], type [complex ]]]]
144
+ 10 | + y : type [Union [Union [ float , int ] , complex ]]
145
+ 11 11 | z : Union [type [complex ], Union [Union [type [Union [ float , int ] ]]]]
146
146
12 12 |
147
147
13 13 | def func (arg : type [int ] | str | type [float ]) - > None : ...
148
148
149
- PYI055 .pyi :11 :4 : PYI055 [* ] Multiple ` type` members in a union . Combine them into one , e .g ., ` type[Union[complex, float, int]]` .
149
+ PYI055 .pyi :11 :4 : PYI055 [* ] Multiple ` type` members in a union . Combine them into one , e .g ., ` type[Union[complex, Union[ float, int] ]]` .
150
150
|
151
- 9 | x : Union [Union [type [float , int ], type [complex ]]]
152
- 10 | y : Union [Union [Union [type [float , int ], type [complex ]]]]
153
- 11 | z : Union [type [complex ], Union [Union [type [float , int ]]]]
154
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ PYI055
151
+ 9 | x : Union [Union [type [Union [ float , int ] ], type [complex ]]]
152
+ 10 | y : Union [Union [Union [type [Union [ float , int ] ], type [complex ]]]]
153
+ 11 | z : Union [type [complex ], Union [Union [type [Union [ float , int ] ]]]]
154
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ PYI055
155
155
12 |
156
156
13 | def func (arg : type [int ] | str | type [float ]) - > None : ...
157
157
|
158
158
= help : Combine multiple ` type` members
159
159
160
160
ℹ Safe fix
161
- 8 8 | w : Union [type [float , int ], type [complex ]]
162
- 9 9 | x : Union [Union [type [float , int ], type [complex ]]]
163
- 10 10 | y : Union [Union [Union [type [float , int ], type [complex ]]]]
164
- 11 | - z : Union [type [complex ], Union [Union [type [float , int ]]]]
165
- 11 | + z : type [Union [complex , float , int ]]
161
+ 8 8 | w : Union [type [Union [ float , int ] ], type [complex ]]
162
+ 9 9 | x : Union [Union [type [Union [ float , int ] ], type [complex ]]]
163
+ 10 10 | y : Union [Union [Union [type [Union [ float , int ] ], type [complex ]]]]
164
+ 11 | - z : Union [type [complex ], Union [Union [type [Union [ float , int ] ]]]]
165
+ 11 | + z : type [Union [complex , Union [ float , int ] ]]
166
166
12 12 |
167
167
13 13 | def func (arg : type [int ] | str | type [float ]) - > None : ...
168
168
14 14 |
169
169
170
170
PYI055 .pyi :13 :15 : PYI055 [* ] Multiple ` type` members in a union . Combine them into one , e .g ., ` type[int | float]` .
171
171
|
172
- 11 | z : Union [type [complex ], Union [Union [type [float , int ]]]]
172
+ 11 | z : Union [type [complex ], Union [Union [type [Union [ float , int ] ]]]]
173
173
12 |
174
174
13 | def func (arg : type [int ] | str | type [float ]) - > None : ...
175
175
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ PYI055
@@ -179,14 +179,14 @@ PYI055.pyi:13:15: PYI055 [*] Multiple `type` members in a union. Combine them in
179
179
= help : Combine multiple ` type` members
180
180
181
181
ℹ Safe fix
182
- 10 10 | y : Union [Union [Union [type [float , int ], type [complex ]]]]
183
- 11 11 | z : Union [type [complex ], Union [Union [type [float , int ]]]]
182
+ 10 10 | y : Union [Union [Union [type [Union [ float , int ] ], type [complex ]]]]
183
+ 11 11 | z : Union [type [complex ], Union [Union [type [Union [ float , int ] ]]]]
184
184
12 12 |
185
185
13 | - def func (arg : type [int ] | str | type [float ]) - > None : ...
186
186
13 | + def func (arg : type [int | float ] | str ) - > None : ...
187
187
14 14 |
188
188
15 15 | # OK
189
- 16 16 | x : type [int , str , float ]
189
+ 16 16 | x : type [int | str | float ]
190
190
191
191
PYI055 .pyi :23 :7 : PYI055 [* ] Multiple ` type` members in a union . Combine them into one , e .g ., ` type[requests_mock.Mocker | httpretty]` .
192
192
|
@@ -270,3 +270,6 @@ PYI055.pyi:29:12: PYI055 [*] Multiple `type` members in a union. Combine them in
270
270
30 | - type [requests_mock .Mocker ], # another comment
271
271
31 | - type [httpretty ], type [str ]] = requests_mock .Mocker
272
272
29 | + item3 : type [Union [requests_mock .Mocker , httpretty , str ]] = requests_mock .Mocker
273
+ 32 30 |
274
+ 33 31 |
275
+ 34 32 | # OK
0 commit comments