This repository was archived by the owner on Jun 26, 2026. It is now read-only.
Repository navigation
Commit f89aee0
Register type aliases typed as Any
Summary:
EDIT: first version was based on wrong assumptions - aliases and globals are separate concepts, differentiated by whether there is an explicit annotation
python/mypy#3494
-----
Some examples where we rely on globals typed as `Any` (they might have some other value on the RHS of the assign) to be valid types:
diffusion/IGSRVHG/browse/master/distillery/gatekeeper/restraints/checks/request/app_os.py$36,45#
https://fburl.com/biggrep/rmd6ufa4
Typeshed mock.pyi uses this for some of its classes:
https://github.com/python/typeshed/blob/0730fe5fcb269df3f1b72e2544671fec1498a6db/stdlib/3/unittest/mock.pyi
Reviewed By: sinancepel
Differential Revision: D13858398
fbshipit-source-id: 290c5d9644c88c52082c58c052ad9a8efe172d641 parent e2999b8 commit f89aee0
4 files changed
Lines changed: 90 additions & 27 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
434 | 434 | | |
435 | 435 | | |
436 | 436 | | |
437 | | - | |
438 | | - | |
439 | | - | |
440 | | - | |
441 | | - | |
442 | | - | |
443 | | - | |
444 | | - | |
445 | | - | |
446 | | - | |
447 | | - | |
448 | | - | |
449 | | - | |
450 | | - | |
451 | | - | |
452 | | - | |
453 | | - | |
454 | 437 | | |
455 | 438 | | |
456 | 439 | | |
457 | 440 | | |
458 | 441 | | |
459 | 442 | | |
460 | | - | |
461 | | - | |
| 443 | + | |
462 | 444 | | |
463 | 445 | | |
464 | 446 | | |
465 | 447 | | |
466 | 448 | | |
467 | 449 | | |
468 | 450 | | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
469 | 456 | | |
470 | | - | |
471 | | - | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
472 | 501 | | |
473 | 502 | | |
474 | | - | |
475 | | - | |
476 | | - | |
477 | | - | |
478 | | - | |
479 | 503 | | |
480 | 504 | | |
481 | 505 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
459 | 459 | | |
460 | 460 | | |
461 | 461 | | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
462 | 484 | | |
463 | 485 | | |
464 | 486 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
172 | 172 | | |
173 | 173 | | |
174 | 174 | | |
175 | | - | |
| 175 | + | |
176 | 176 | | |
177 | 177 | | |
178 | 178 | | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
179 | 186 | | |
180 | 187 | | |
181 | 188 | | |
| |||
200 | 207 | | |
201 | 208 | | |
202 | 209 | | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
203 | 216 | | |
204 | 217 | | |
205 | 218 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
228 | 228 | | |
229 | 229 | | |
230 | 230 | | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
231 | 235 | | |
232 | 236 | | |
233 | 237 | | |
| |||
0 commit comments