Commit 93b9a38
Mark TypeVar/ParamSpec/TypeVarTuple 'name' as positional-only
These special-form constructors require `name` to be a positional
string literal (PEP 484 / 612 / 646); type checkers reject the keyword
form, e.g. mypy:
error: TypeVar() expects a string literal as first argument [misc]
The stubs advertised `name` as positional-or-keyword, which misleads
tools that consume typeshed as ground truth. No type-checker behaviour
changes (these are special-cased); the runtime objects are C-level with
no introspectable signature on 3.12+, so stubtest is unaffected there.
Refs #15804
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 5372bd5 commit 93b9a38
1 file changed
Lines changed: 12 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
178 | 178 | | |
179 | 179 | | |
180 | 180 | | |
| 181 | + | |
181 | 182 | | |
182 | 183 | | |
183 | 184 | | |
| |||
189 | 190 | | |
190 | 191 | | |
191 | 192 | | |
| 193 | + | |
192 | 194 | | |
193 | 195 | | |
194 | 196 | | |
| |||
199 | 201 | | |
200 | 202 | | |
201 | 203 | | |
| 204 | + | |
202 | 205 | | |
203 | 206 | | |
204 | 207 | | |
| |||
208 | 211 | | |
209 | 212 | | |
210 | 213 | | |
| 214 | + | |
211 | 215 | | |
212 | 216 | | |
213 | 217 | | |
| |||
280 | 284 | | |
281 | 285 | | |
282 | 286 | | |
| 287 | + | |
283 | 288 | | |
284 | 289 | | |
285 | 290 | | |
| |||
288 | 293 | | |
289 | 294 | | |
290 | 295 | | |
291 | | - | |
| 296 | + | |
292 | 297 | | |
293 | | - | |
| 298 | + | |
294 | 299 | | |
295 | | - | |
| 300 | + | |
296 | 301 | | |
297 | 302 | | |
298 | 303 | | |
| |||
345 | 350 | | |
346 | 351 | | |
347 | 352 | | |
| 353 | + | |
348 | 354 | | |
349 | 355 | | |
350 | 356 | | |
| |||
356 | 362 | | |
357 | 363 | | |
358 | 364 | | |
| 365 | + | |
359 | 366 | | |
360 | 367 | | |
361 | 368 | | |
| |||
364 | 371 | | |
365 | 372 | | |
366 | 373 | | |
367 | | - | |
| 374 | + | |
368 | 375 | | |
369 | 376 | | |
370 | 377 | | |
371 | | - | |
| 378 | + | |
372 | 379 | | |
373 | 380 | | |
374 | 381 | | |
| |||
0 commit comments