|
62 | 62 |
|
63 | 63 | class _BoolOp(Protocol[_GenericType_co]): |
64 | 64 | @overload |
65 | | - def __call__(self, __other: _BoolLike_co) -> _GenericType_co: ... |
| 65 | + def __call__(self, other: _BoolLike_co, /) -> _GenericType_co: ... |
66 | 66 | @overload # platform dependent |
67 | | - def __call__(self, __other: int) -> int_: ... |
| 67 | + def __call__(self, other: int, /) -> int_: ... |
68 | 68 | @overload |
69 | | - def __call__(self, __other: float) -> float64: ... |
| 69 | + def __call__(self, other: float, /) -> float64: ... |
70 | 70 | @overload |
71 | | - def __call__(self, __other: complex) -> complex128: ... |
| 71 | + def __call__(self, other: complex, /) -> complex128: ... |
72 | 72 | @overload |
73 | | - def __call__(self, __other: _NumberType) -> _NumberType: ... |
| 73 | + def __call__(self, other: _NumberType, /) -> _NumberType: ... |
74 | 74 |
|
75 | 75 | class _BoolBitOp(Protocol[_GenericType_co]): |
76 | 76 | @overload |
77 | | - def __call__(self, __other: _BoolLike_co) -> _GenericType_co: ... |
| 77 | + def __call__(self, other: _BoolLike_co, /) -> _GenericType_co: ... |
78 | 78 | @overload # platform dependent |
79 | | - def __call__(self, __other: int) -> int_: ... |
| 79 | + def __call__(self, other: int, /) -> int_: ... |
80 | 80 | @overload |
81 | | - def __call__(self, __other: _IntType) -> _IntType: ... |
| 81 | + def __call__(self, other: _IntType, /) -> _IntType: ... |
82 | 82 |
|
83 | 83 | class _BoolSub(Protocol): |
84 | | - # Note that `__other: bool_` is absent here |
| 84 | + # Note that `other: bool_` is absent here |
85 | 85 | @overload |
86 | | - def __call__(self, __other: bool) -> NoReturn: ... |
| 86 | + def __call__(self, other: bool, /) -> NoReturn: ... |
87 | 87 | @overload # platform dependent |
88 | | - def __call__(self, __other: int) -> int_: ... |
| 88 | + def __call__(self, other: int, /) -> int_: ... |
89 | 89 | @overload |
90 | | - def __call__(self, __other: float) -> float64: ... |
| 90 | + def __call__(self, other: float, /) -> float64: ... |
91 | 91 | @overload |
92 | | - def __call__(self, __other: complex) -> complex128: ... |
| 92 | + def __call__(self, other: complex, /) -> complex128: ... |
93 | 93 | @overload |
94 | | - def __call__(self, __other: _NumberType) -> _NumberType: ... |
| 94 | + def __call__(self, other: _NumberType, /) -> _NumberType: ... |
95 | 95 |
|
96 | 96 | class _BoolTrueDiv(Protocol): |
97 | 97 | @overload |
98 | | - def __call__(self, __other: float | _IntLike_co) -> float64: ... |
| 98 | + def __call__(self, other: float | _IntLike_co, /) -> float64: ... |
99 | 99 | @overload |
100 | | - def __call__(self, __other: complex) -> complex128: ... |
| 100 | + def __call__(self, other: complex, /) -> complex128: ... |
101 | 101 | @overload |
102 | | - def __call__(self, __other: _NumberType) -> _NumberType: ... |
| 102 | + def __call__(self, other: _NumberType, /) -> _NumberType: ... |
103 | 103 |
|
104 | 104 | class _BoolMod(Protocol): |
105 | 105 | @overload |
106 | | - def __call__(self, __other: _BoolLike_co) -> int8: ... |
| 106 | + def __call__(self, other: _BoolLike_co, /) -> int8: ... |
107 | 107 | @overload # platform dependent |
108 | | - def __call__(self, __other: int) -> int_: ... |
| 108 | + def __call__(self, other: int, /) -> int_: ... |
109 | 109 | @overload |
110 | | - def __call__(self, __other: float) -> float64: ... |
| 110 | + def __call__(self, other: float, /) -> float64: ... |
111 | 111 | @overload |
112 | | - def __call__(self, __other: _IntType) -> _IntType: ... |
| 112 | + def __call__(self, other: _IntType, /) -> _IntType: ... |
113 | 113 | @overload |
114 | | - def __call__(self, __other: _FloatType) -> _FloatType: ... |
| 114 | + def __call__(self, other: _FloatType, /) -> _FloatType: ... |
115 | 115 |
|
116 | 116 | class _BoolDivMod(Protocol): |
117 | 117 | @overload |
118 | | - def __call__(self, __other: _BoolLike_co) -> _2Tuple[int8]: ... |
| 118 | + def __call__(self, other: _BoolLike_co, /) -> _2Tuple[int8]: ... |
119 | 119 | @overload # platform dependent |
120 | | - def __call__(self, __other: int) -> _2Tuple[int_]: ... |
| 120 | + def __call__(self, other: int, /) -> _2Tuple[int_]: ... |
121 | 121 | @overload |
122 | | - def __call__(self, __other: float) -> _2Tuple[floating[_NBit1 | _NBitDouble]]: ... |
| 122 | + def __call__(self, other: float, /) -> _2Tuple[floating[_NBit1 | _NBitDouble]]: ... |
123 | 123 | @overload |
124 | | - def __call__(self, __other: _IntType) -> _2Tuple[_IntType]: ... |
| 124 | + def __call__(self, other: _IntType, /) -> _2Tuple[_IntType]: ... |
125 | 125 | @overload |
126 | | - def __call__(self, __other: _FloatType) -> _2Tuple[_FloatType]: ... |
| 126 | + def __call__(self, other: _FloatType, /) -> _2Tuple[_FloatType]: ... |
127 | 127 |
|
128 | 128 | class _TD64Div(Protocol[_NumberType_co]): |
129 | 129 | @overload |
130 | | - def __call__(self, __other: timedelta64) -> _NumberType_co: ... |
| 130 | + def __call__(self, other: timedelta64, /) -> _NumberType_co: ... |
131 | 131 | @overload |
132 | | - def __call__(self, __other: _BoolLike_co) -> NoReturn: ... |
| 132 | + def __call__(self, other: _BoolLike_co, /) -> NoReturn: ... |
133 | 133 | @overload |
134 | | - def __call__(self, __other: _FloatLike_co) -> timedelta64: ... |
| 134 | + def __call__(self, other: _FloatLike_co, /) -> timedelta64: ... |
135 | 135 |
|
136 | 136 | class _IntTrueDiv(Protocol[_NBit1]): |
137 | 137 | @overload |
138 | | - def __call__(self, __other: bool) -> floating[_NBit1]: ... |
| 138 | + def __call__(self, other: bool, /) -> floating[_NBit1]: ... |
139 | 139 | @overload |
140 | | - def __call__(self, __other: int) -> floating[_NBit1 | _NBitInt]: ... |
| 140 | + def __call__(self, other: int, /) -> floating[_NBit1 | _NBitInt]: ... |
141 | 141 | @overload |
142 | | - def __call__(self, __other: float) -> floating[_NBit1 | _NBitDouble]: ... |
| 142 | + def __call__(self, other: float, /) -> floating[_NBit1 | _NBitDouble]: ... |
143 | 143 | @overload |
144 | 144 | def __call__( |
145 | | - self, __other: complex |
| 145 | + self, other: complex, /, |
146 | 146 | ) -> complexfloating[_NBit1 | _NBitDouble, _NBit1 | _NBitDouble]: ... |
147 | 147 | @overload |
148 | | - def __call__(self, __other: integer[_NBit2]) -> floating[_NBit1 | _NBit2]: ... |
| 148 | + def __call__(self, other: integer[_NBit2], /) -> floating[_NBit1 | _NBit2]: ... |
149 | 149 |
|
150 | 150 | class _UnsignedIntOp(Protocol[_NBit1]): |
151 | 151 | # NOTE: `uint64 + signedinteger -> float64` |
152 | 152 | @overload |
153 | | - def __call__(self, __other: bool) -> unsignedinteger[_NBit1]: ... |
| 153 | + def __call__(self, other: bool, /) -> unsignedinteger[_NBit1]: ... |
154 | 154 | @overload |
155 | 155 | def __call__( |
156 | | - self, __other: int | signedinteger[Any] |
| 156 | + self, other: int | signedinteger[Any], / |
157 | 157 | ) -> Any: ... |
158 | 158 | @overload |
159 | | - def __call__(self, __other: float) -> floating[_NBit1 | _NBitDouble]: ... |
| 159 | + def __call__(self, other: float, /) -> floating[_NBit1 | _NBitDouble]: ... |
160 | 160 | @overload |
161 | 161 | def __call__( |
162 | | - self, __other: complex |
| 162 | + self, other: complex, /, |
163 | 163 | ) -> complexfloating[_NBit1 | _NBitDouble, _NBit1 | _NBitDouble]: ... |
164 | 164 | @overload |
165 | 165 | def __call__( |
166 | | - self, __other: unsignedinteger[_NBit2] |
| 166 | + self, other: unsignedinteger[_NBit2], / |
167 | 167 | ) -> unsignedinteger[_NBit1 | _NBit2]: ... |
168 | 168 |
|
169 | 169 | class _UnsignedIntBitOp(Protocol[_NBit1]): |
170 | 170 | @overload |
171 | | - def __call__(self, __other: bool) -> unsignedinteger[_NBit1]: ... |
| 171 | + def __call__(self, other: bool, /) -> unsignedinteger[_NBit1]: ... |
172 | 172 | @overload |
173 | | - def __call__(self, __other: int) -> signedinteger[Any]: ... |
| 173 | + def __call__(self, other: int, /) -> signedinteger[Any]: ... |
174 | 174 | @overload |
175 | | - def __call__(self, __other: signedinteger[Any]) -> signedinteger[Any]: ... |
| 175 | + def __call__(self, other: signedinteger[Any], /) -> signedinteger[Any]: ... |
176 | 176 | @overload |
177 | 177 | def __call__( |
178 | | - self, __other: unsignedinteger[_NBit2] |
| 178 | + self, other: unsignedinteger[_NBit2], / |
179 | 179 | ) -> unsignedinteger[_NBit1 | _NBit2]: ... |
180 | 180 |
|
181 | 181 | class _UnsignedIntMod(Protocol[_NBit1]): |
182 | 182 | @overload |
183 | | - def __call__(self, __other: bool) -> unsignedinteger[_NBit1]: ... |
| 183 | + def __call__(self, other: bool, /) -> unsignedinteger[_NBit1]: ... |
184 | 184 | @overload |
185 | 185 | def __call__( |
186 | | - self, __other: int | signedinteger[Any] |
| 186 | + self, other: int | signedinteger[Any], / |
187 | 187 | ) -> Any: ... |
188 | 188 | @overload |
189 | | - def __call__(self, __other: float) -> floating[_NBit1 | _NBitDouble]: ... |
| 189 | + def __call__(self, other: float, /) -> floating[_NBit1 | _NBitDouble]: ... |
190 | 190 | @overload |
191 | 191 | def __call__( |
192 | | - self, __other: unsignedinteger[_NBit2] |
| 192 | + self, other: unsignedinteger[_NBit2], / |
193 | 193 | ) -> unsignedinteger[_NBit1 | _NBit2]: ... |
194 | 194 |
|
195 | 195 | class _UnsignedIntDivMod(Protocol[_NBit1]): |
196 | 196 | @overload |
197 | | - def __call__(self, __other: bool) -> _2Tuple[signedinteger[_NBit1]]: ... |
| 197 | + def __call__(self, other: bool, /) -> _2Tuple[signedinteger[_NBit1]]: ... |
198 | 198 | @overload |
199 | 199 | def __call__( |
200 | | - self, __other: int | signedinteger[Any] |
| 200 | + self, other: int | signedinteger[Any], / |
201 | 201 | ) -> _2Tuple[Any]: ... |
202 | 202 | @overload |
203 | | - def __call__(self, __other: float) -> _2Tuple[floating[_NBit1 | _NBitDouble]]: ... |
| 203 | + def __call__(self, other: float, /) -> _2Tuple[floating[_NBit1 | _NBitDouble]]: ... |
204 | 204 | @overload |
205 | 205 | def __call__( |
206 | | - self, __other: unsignedinteger[_NBit2] |
| 206 | + self, other: unsignedinteger[_NBit2], / |
207 | 207 | ) -> _2Tuple[unsignedinteger[_NBit1 | _NBit2]]: ... |
208 | 208 |
|
209 | 209 | class _SignedIntOp(Protocol[_NBit1]): |
210 | 210 | @overload |
211 | | - def __call__(self, __other: bool) -> signedinteger[_NBit1]: ... |
| 211 | + def __call__(self, other: bool, /) -> signedinteger[_NBit1]: ... |
212 | 212 | @overload |
213 | | - def __call__(self, __other: int) -> signedinteger[_NBit1 | _NBitInt]: ... |
| 213 | + def __call__(self, other: int, /) -> signedinteger[_NBit1 | _NBitInt]: ... |
214 | 214 | @overload |
215 | | - def __call__(self, __other: float) -> floating[_NBit1 | _NBitDouble]: ... |
| 215 | + def __call__(self, other: float, /) -> floating[_NBit1 | _NBitDouble]: ... |
216 | 216 | @overload |
217 | 217 | def __call__( |
218 | | - self, __other: complex |
| 218 | + self, other: complex, /, |
219 | 219 | ) -> complexfloating[_NBit1 | _NBitDouble, _NBit1 | _NBitDouble]: ... |
220 | 220 | @overload |
221 | 221 | def __call__( |
222 | | - self, __other: signedinteger[_NBit2] |
| 222 | + self, other: signedinteger[_NBit2], /, |
223 | 223 | ) -> signedinteger[_NBit1 | _NBit2]: ... |
224 | 224 |
|
225 | 225 | class _SignedIntBitOp(Protocol[_NBit1]): |
226 | 226 | @overload |
227 | | - def __call__(self, __other: bool) -> signedinteger[_NBit1]: ... |
| 227 | + def __call__(self, other: bool, /) -> signedinteger[_NBit1]: ... |
228 | 228 | @overload |
229 | | - def __call__(self, __other: int) -> signedinteger[_NBit1 | _NBitInt]: ... |
| 229 | + def __call__(self, other: int, /) -> signedinteger[_NBit1 | _NBitInt]: ... |
230 | 230 | @overload |
231 | 231 | def __call__( |
232 | | - self, __other: signedinteger[_NBit2] |
| 232 | + self, other: signedinteger[_NBit2], /, |
233 | 233 | ) -> signedinteger[_NBit1 | _NBit2]: ... |
234 | 234 |
|
235 | 235 | class _SignedIntMod(Protocol[_NBit1]): |
236 | 236 | @overload |
237 | | - def __call__(self, __other: bool) -> signedinteger[_NBit1]: ... |
| 237 | + def __call__(self, other: bool, /) -> signedinteger[_NBit1]: ... |
238 | 238 | @overload |
239 | | - def __call__(self, __other: int) -> signedinteger[_NBit1 | _NBitInt]: ... |
| 239 | + def __call__(self, other: int, /) -> signedinteger[_NBit1 | _NBitInt]: ... |
240 | 240 | @overload |
241 | | - def __call__(self, __other: float) -> floating[_NBit1 | _NBitDouble]: ... |
| 241 | + def __call__(self, other: float, /) -> floating[_NBit1 | _NBitDouble]: ... |
242 | 242 | @overload |
243 | 243 | def __call__( |
244 | | - self, __other: signedinteger[_NBit2] |
| 244 | + self, other: signedinteger[_NBit2], /, |
245 | 245 | ) -> signedinteger[_NBit1 | _NBit2]: ... |
246 | 246 |
|
247 | 247 | class _SignedIntDivMod(Protocol[_NBit1]): |
248 | 248 | @overload |
249 | | - def __call__(self, __other: bool) -> _2Tuple[signedinteger[_NBit1]]: ... |
| 249 | + def __call__(self, other: bool, /) -> _2Tuple[signedinteger[_NBit1]]: ... |
250 | 250 | @overload |
251 | | - def __call__(self, __other: int) -> _2Tuple[signedinteger[_NBit1 | _NBitInt]]: ... |
| 251 | + def __call__(self, other: int, /) -> _2Tuple[signedinteger[_NBit1 | _NBitInt]]: ... |
252 | 252 | @overload |
253 | | - def __call__(self, __other: float) -> _2Tuple[floating[_NBit1 | _NBitDouble]]: ... |
| 253 | + def __call__(self, other: float, /) -> _2Tuple[floating[_NBit1 | _NBitDouble]]: ... |
254 | 254 | @overload |
255 | 255 | def __call__( |
256 | | - self, __other: signedinteger[_NBit2] |
| 256 | + self, other: signedinteger[_NBit2], /, |
257 | 257 | ) -> _2Tuple[signedinteger[_NBit1 | _NBit2]]: ... |
258 | 258 |
|
259 | 259 | class _FloatOp(Protocol[_NBit1]): |
260 | 260 | @overload |
261 | | - def __call__(self, __other: bool) -> floating[_NBit1]: ... |
| 261 | + def __call__(self, other: bool, /) -> floating[_NBit1]: ... |
262 | 262 | @overload |
263 | | - def __call__(self, __other: int) -> floating[_NBit1 | _NBitInt]: ... |
| 263 | + def __call__(self, other: int, /) -> floating[_NBit1 | _NBitInt]: ... |
264 | 264 | @overload |
265 | | - def __call__(self, __other: float) -> floating[_NBit1 | _NBitDouble]: ... |
| 265 | + def __call__(self, other: float, /) -> floating[_NBit1 | _NBitDouble]: ... |
266 | 266 | @overload |
267 | 267 | def __call__( |
268 | | - self, __other: complex |
| 268 | + self, other: complex, /, |
269 | 269 | ) -> complexfloating[_NBit1 | _NBitDouble, _NBit1 | _NBitDouble]: ... |
270 | 270 | @overload |
271 | 271 | def __call__( |
272 | | - self, __other: integer[_NBit2] | floating[_NBit2] |
| 272 | + self, other: integer[_NBit2] | floating[_NBit2], / |
273 | 273 | ) -> floating[_NBit1 | _NBit2]: ... |
274 | 274 |
|
275 | 275 | class _FloatMod(Protocol[_NBit1]): |
276 | 276 | @overload |
277 | | - def __call__(self, __other: bool) -> floating[_NBit1]: ... |
| 277 | + def __call__(self, other: bool, /) -> floating[_NBit1]: ... |
278 | 278 | @overload |
279 | | - def __call__(self, __other: int) -> floating[_NBit1 | _NBitInt]: ... |
| 279 | + def __call__(self, other: int, /) -> floating[_NBit1 | _NBitInt]: ... |
280 | 280 | @overload |
281 | | - def __call__(self, __other: float) -> floating[_NBit1 | _NBitDouble]: ... |
| 281 | + def __call__(self, other: float, /) -> floating[_NBit1 | _NBitDouble]: ... |
282 | 282 | @overload |
283 | 283 | def __call__( |
284 | | - self, __other: integer[_NBit2] | floating[_NBit2] |
| 284 | + self, other: integer[_NBit2] | floating[_NBit2], / |
285 | 285 | ) -> floating[_NBit1 | _NBit2]: ... |
286 | 286 |
|
287 | 287 | class _FloatDivMod(Protocol[_NBit1]): |
288 | 288 | @overload |
289 | | - def __call__(self, __other: bool) -> _2Tuple[floating[_NBit1]]: ... |
| 289 | + def __call__(self, other: bool, /) -> _2Tuple[floating[_NBit1]]: ... |
290 | 290 | @overload |
291 | | - def __call__(self, __other: int) -> _2Tuple[floating[_NBit1 | _NBitInt]]: ... |
| 291 | + def __call__(self, other: int, /) -> _2Tuple[floating[_NBit1 | _NBitInt]]: ... |
292 | 292 | @overload |
293 | | - def __call__(self, __other: float) -> _2Tuple[floating[_NBit1 | _NBitDouble]]: ... |
| 293 | + def __call__(self, other: float, /) -> _2Tuple[floating[_NBit1 | _NBitDouble]]: ... |
294 | 294 | @overload |
295 | 295 | def __call__( |
296 | | - self, __other: integer[_NBit2] | floating[_NBit2] |
| 296 | + self, other: integer[_NBit2] | floating[_NBit2], / |
297 | 297 | ) -> _2Tuple[floating[_NBit1 | _NBit2]]: ... |
298 | 298 |
|
299 | 299 | class _ComplexOp(Protocol[_NBit1]): |
300 | 300 | @overload |
301 | | - def __call__(self, __other: bool) -> complexfloating[_NBit1, _NBit1]: ... |
| 301 | + def __call__(self, other: bool, /) -> complexfloating[_NBit1, _NBit1]: ... |
302 | 302 | @overload |
303 | | - def __call__(self, __other: int) -> complexfloating[_NBit1 | _NBitInt, _NBit1 | _NBitInt]: ... |
| 303 | + def __call__(self, other: int, /) -> complexfloating[_NBit1 | _NBitInt, _NBit1 | _NBitInt]: ... |
304 | 304 | @overload |
305 | 305 | def __call__( |
306 | | - self, __other: complex |
| 306 | + self, other: complex, /, |
307 | 307 | ) -> complexfloating[_NBit1 | _NBitDouble, _NBit1 | _NBitDouble]: ... |
308 | 308 | @overload |
309 | 309 | def __call__( |
310 | 310 | self, |
311 | | - __other: Union[ |
| 311 | + other: Union[ |
312 | 312 | integer[_NBit2], |
313 | 313 | floating[_NBit2], |
314 | 314 | complexfloating[_NBit2, _NBit2], |
315 | | - ] |
| 315 | + ], /, |
316 | 316 | ) -> complexfloating[_NBit1 | _NBit2, _NBit1 | _NBit2]: ... |
317 | 317 |
|
318 | 318 | class _NumberOp(Protocol): |
319 | | - def __call__(self, __other: _NumberLike_co) -> Any: ... |
| 319 | + def __call__(self, other: _NumberLike_co, /) -> Any: ... |
320 | 320 |
|
321 | 321 | class _ComparisonOp(Protocol[_T1, _T2]): |
322 | 322 | @overload |
323 | | - def __call__(self, __other: _T1) -> bool_: ... |
| 323 | + def __call__(self, other: _T1, /) -> bool_: ... |
324 | 324 | @overload |
325 | | - def __call__(self, __other: _T2) -> NDArray[bool_]: ... |
| 325 | + def __call__(self, other: _T2, /) -> NDArray[bool_]: ... |
0 commit comments