Skip to content

Commit ace9f25

Browse files
authored
Delete workarounds for fixed typeshed bugs (#12093)
1 parent 7af46ce commit ace9f25

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

mypy/checkexpr.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
from contextlib import contextmanager
55
import itertools
66
from typing import (
7-
Any, cast, Dict, Set, List, Tuple, Callable, Union, Optional, Sequence, Iterator
7+
cast, Dict, Set, List, Tuple, Callable, Union, Optional, Sequence, Iterator
88
)
99
from typing_extensions import ClassVar, Final, overload, TypeAlias as _TypeAlias
1010

@@ -1607,8 +1607,7 @@ def check_overload_call(self,
16071607
# Record if we succeeded. Next we need to see if maybe normal procedure
16081608
# gives a narrower type.
16091609
if unioned_return:
1610-
# TODO: fix signature of zip() in typeshed.
1611-
returns, inferred_types = cast(Any, zip)(*unioned_return)
1610+
returns, inferred_types = zip(*unioned_return)
16121611
# Note that we use `combine_function_signatures` instead of just returning
16131612
# a union of inferred callables because for example a call
16141613
# Union[int -> int, str -> str](Union[int, str]) is invalid and

mypy/ipc.py

-3
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,6 @@ def read(self, size: int = 100000) -> bytes:
5454
if sys.platform == 'win32':
5555
while True:
5656
ov, err = _winapi.ReadFile(self.connection, size, overlapped=True)
57-
# TODO: remove once typeshed supports Literal types
58-
assert isinstance(ov, _winapi.Overlapped)
59-
assert isinstance(err, int)
6057
try:
6158
if err == _winapi.ERROR_IO_PENDING:
6259
timeout = int(self.timeout * 1000) if self.timeout else _winapi.INFINITE

0 commit comments

Comments
 (0)