Commit 83cdfaa
Benjamin Moody
Fix type inference for ALLOWED_TYPES.
When using mypy to check the package, it will attempt to infer types
that are not specified.
Currently, mypy is able to understand that constructing a dict from a
Sequence[Tuple[X, Y]] yields a Dict[X, Y], but if we use lists instead
of tuples, mypy doesn't understand and seems to think the result is a
Dict[X, X].
This is probably a bug in mypy, but in any case, using tuples here
rather than lists is more idiomatic and doesn't affect the behavior of
the code.1 parent b88774a commit 83cdfaa
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1661 | 1661 | | |
1662 | 1662 | | |
1663 | 1663 | | |
1664 | | - | |
| 1664 | + | |
1665 | 1665 | | |
1666 | 1666 | | |
1667 | 1667 | | |
| |||
0 commit comments