Commit ab5dea2
authored
By using `Sequence`, these become covariant. Previously, doing something like:
```
VALID = [
ValidTestCase("..."),
ValidTestCase("..."),
]
```
would be a type error in `pyre`, because `pyre` would infer this to be a `list[ValidTestCase]` which is *not* a subclass of `list[str | ValidTestCase]`. By making these `Sequence`s (and thus immutable), we can avoid the requirement of having explicit type annotations everywhere for this.
1 parent e5b6e52 commit ab5dea2
1 file changed
+2
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
79 | | - | |
| 79 | + | |
80 | 80 | | |
81 | 81 | | |
82 | | - | |
| 82 | + | |
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
| |||
0 commit comments