Commit d2f4bec
committed
Restore
The previous commit removed the `cast()` calls because newer mypy
considered them redundant. That broke Python 3.9's mypy, which still
needs the cast for narrowing through `isinstance(key, self._crypto_key_types)`.
Restore the casts and suppress `redundant-cast` on newer mypy while
allowing `unused-ignore` on older mypy where the directive isn't needed.cast() calls with cross-version type: ignore for prepare_key
1 parent 22f478c commit d2f4bec
1 file changed
Lines changed: 8 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
443 | 443 | | |
444 | 444 | | |
445 | 445 | | |
446 | | - | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
447 | 450 | | |
448 | 451 | | |
449 | 452 | | |
| |||
637 | 640 | | |
638 | 641 | | |
639 | 642 | | |
640 | | - | |
641 | | - | |
| 643 | + | |
| 644 | + | |
| 645 | + | |
| 646 | + | |
642 | 647 | | |
643 | 648 | | |
644 | 649 | | |
| |||
0 commit comments