@@ -40,7 +40,7 @@ PYI055.pyi:5:4: PYI055 [*] Multiple `type` members in a union. Combine them into
4040 5 | + t : type [int | str | float ]
41416 6 | u : builtins .type [int ] | type [str ] | builtins .type [complex ]
42427 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 ]]
4444
4545PYI055 .pyi :6 :4 : PYI055 [* ] Multiple ` type` members in a union . Combine them into one , e .g ., ` type[int | str | complex]` .
4646 |
@@ -49,7 +49,7 @@ PYI055.pyi:6:4: PYI055 [*] Multiple `type` members in a union. Combine them into
49496 | u : builtins .type [int ] | type [str ] | builtins .type [complex ]
5050 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ PYI055
51517 | 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 ]]
5353 |
5454 = help : Combine multiple ` type` members
5555
@@ -60,17 +60,17 @@ PYI055.pyi:6:4: PYI055 [*] Multiple `type` members in a union. Combine them into
60606 | - u : builtins .type [int ] | type [str ] | builtins .type [complex ]
6161 6 | + u : type [int | str | complex ]
62627 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 ]]]
6565
6666PYI055 .pyi :7 :4 : PYI055 [* ] Multiple ` type` members in a union . Combine them into one , e .g ., ` type[Union[float, complex]]` .
6767 |
68685 | t : type [int ] | type [str ] | type [float ]
69696 | u : builtins .type [int ] | type [str ] | builtins .type [complex ]
70707 | v : Union [type [float ], type [complex ]]
7171 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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 ]]]
7474 |
7575 = help : Combine multiple ` type` members
7676
@@ -80,96 +80,96 @@ PYI055.pyi:7:4: PYI055 [*] Multiple `type` members in a union. Combine them into
80806 6 | u : builtins .type [int ] | type [str ] | builtins .type [complex ]
81817 | - v : Union [type [float ], type [complex ]]
8282 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 ]]]]
8686
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]]` .
8888 |
8989 6 | u : builtins .type [int ] | type [str ] | builtins .type [complex ]
9090 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 ]]]]
9595 |
9696 = help : Combine multiple ` type` members
9797
9898ℹ Safe fix
99995 5 | t : type [int ] | type [str ] | type [float ]
1001006 6 | u : builtins .type [int ] | type [str ] | builtins .type [complex ]
1011017 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 ] ]]]]
107107
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]]` .
109109 |
110110 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 ] ]]]]
116116 |
117117 = help : Combine multiple ` type` members
118118
119119ℹ Safe fix
1201206 6 | u : builtins .type [int ] | type [str ] | builtins .type [complex ]
1211217 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 ] ]]]]
12712712 12 |
128128
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]]` .
130130 |
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 ] ]]]]
136136 |
137137 = help : Combine multiple ` type` members
138138
139139ℹ Safe fix
1401407 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 ] ]]]]
14614612 12 |
14714713 13 | def func (arg : type [int ] | str | type [float ]) - > None : ...
148148
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] ]]` .
150150 |
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
15515512 |
15615613 | def func (arg : type [int ] | str | type [float ]) - > None : ...
157157 |
158158 = help : Combine multiple ` type` members
159159
160160ℹ 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 ] ]]
16616612 12 |
16716713 13 | def func (arg : type [int ] | str | type [float ]) - > None : ...
16816814 14 |
169169
170170PYI055 .pyi :13 :15 : PYI055 [* ] Multiple ` type` members in a union . Combine them into one , e .g ., ` type[int | float]` .
171171 |
172- 11 | z : Union [type [complex ], Union [Union [type [float , int ]]]]
172+ 11 | z : Union [type [complex ], Union [Union [type [Union [ float , int ] ]]]]
17317312 |
17417413 | def func (arg : type [int ] | str | type [float ]) - > None : ...
175175 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ PYI055
@@ -179,14 +179,14 @@ PYI055.pyi:13:15: PYI055 [*] Multiple `type` members in a union. Combine them in
179179 = help : Combine multiple ` type` members
180180
181181ℹ 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 ] ]]]]
18418412 12 |
18518513 | - def func (arg : type [int ] | str | type [float ]) - > None : ...
186186 13 | + def func (arg : type [int | float ] | str ) - > None : ...
18718714 14 |
18818815 15 | # OK
189- 16 16 | x : type [int , str , float ]
189+ 16 16 | x : type [int | str | float ]
190190
191191PYI055 .pyi :23 :7 : PYI055 [* ] Multiple ` type` members in a union . Combine them into one , e .g ., ` type[requests_mock.Mocker | httpretty]` .
192192 |
@@ -270,3 +270,6 @@ PYI055.pyi:29:12: PYI055 [*] Multiple `type` members in a union. Combine them in
27027030 | - type [requests_mock .Mocker ], # another comment
27127131 | - type [httpretty ], type [str ]] = requests_mock .Mocker
272272 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