mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-01-05 11:03:25 +08:00
Clean out the pytype blacklist (#1667)
This commit is contained in:
committed by
Matthias Kramm
parent
9e76d44b09
commit
817c270c32
@@ -215,15 +215,18 @@ class deque(MutableSequence[_T], Generic[_T]):
|
||||
@overload
|
||||
def __getitem__(self, index: int) -> _T: ...
|
||||
@overload
|
||||
def __getitem__(self, s: slice) -> Sequence[_T]: raise TypeError
|
||||
def __getitem__(self, s: slice) -> Sequence[_T]:
|
||||
raise TypeError
|
||||
@overload
|
||||
def __setitem__(self, i: int, x: _T) -> None: ...
|
||||
@overload
|
||||
def __setitem__(self, s: slice, o: Iterable[_T]) -> None: raise TypeError
|
||||
def __setitem__(self, s: slice, o: Iterable[_T]) -> None:
|
||||
raise TypeError
|
||||
@overload
|
||||
def __delitem__(self, i: int) -> None: ...
|
||||
@overload
|
||||
def __delitem__(self, s: slice) -> None: raise TypeError
|
||||
def __delitem__(self, s: slice) -> None:
|
||||
raise TypeError
|
||||
|
||||
def __contains__(self, o: object) -> bool: ...
|
||||
def __reversed__(self) -> Iterator[_T]: ...
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
from typing import TypeVar, Generic, Any, Iterable, Iterator, Callable, Tuple, Optional, Set
|
||||
from collections import namedtuple
|
||||
from typing import TypeVar, Generic, Any, Iterable, Iterator, Callable, Tuple, Optional, Set, NamedTuple
|
||||
|
||||
FIRST_COMPLETED = ... # type: str
|
||||
FIRST_EXCEPTION = ... # type: str
|
||||
@@ -15,7 +14,7 @@ class Error(Exception): ...
|
||||
class CancelledError(Error): ...
|
||||
class TimeoutError(Error): ...
|
||||
|
||||
DoneAndNotDoneFutures = namedtuple('DoneAndNotDoneFutures', 'done not_done')
|
||||
DoneAndNotDoneFutures = NamedTuple('DoneAndNotDoneFutures', [('done', Future[Any]), ('not_done', Future[Any])])
|
||||
|
||||
_T = TypeVar('_T')
|
||||
|
||||
|
||||
@@ -5,9 +5,10 @@ from enum import IntEnum
|
||||
if sys.version_info >= (3, 5):
|
||||
class HTTPStatus(IntEnum):
|
||||
|
||||
def __init__(self, *a) -> None:
|
||||
self.phrase = ... # type: str
|
||||
self.description = ... # type: str
|
||||
def __init__(self, *a) -> None: ...
|
||||
|
||||
phrase = ... # type: str
|
||||
description = ... # type: str
|
||||
|
||||
CONTINUE = ... # type: HTTPStatus
|
||||
SWITCHING_PROTOCOLS = ... # type: HTTPStatus
|
||||
|
||||
@@ -29,5 +29,5 @@ WSGIApplication = Callable[
|
||||
Callable[[str, List[Tuple[str, str]], _exc_info], Callable[[Union[bytes, str]], None]]
|
||||
]
|
||||
],
|
||||
Iterable[Union[bytes, str]],
|
||||
Iterable[Union[bytes, str]]
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user