Add mypy error codes to '# type: ignore' comments (#6379)

This commit is contained in:
Akuli
2021-11-26 08:07:56 +02:00
committed by GitHub
parent 1278fa86e2
commit a5bc1e037f
74 changed files with 218 additions and 202 deletions

View File

@@ -95,9 +95,9 @@ class UserString(Sequence[str]):
def __contains__(self, char: object) -> bool: ...
def __len__(self) -> int: ...
# It should return a str to implement Sequence correctly, but it doesn't.
def __getitem__(self: _UserStringT, i: int | slice) -> _UserStringT: ... # type: ignore
def __iter__(self: _UserStringT) -> Iterator[_UserStringT]: ... # type: ignore
def __reversed__(self: _UserStringT) -> Iterator[_UserStringT]: ... # type: ignore
def __getitem__(self: _UserStringT, i: int | slice) -> _UserStringT: ... # type: ignore[override]
def __iter__(self: _UserStringT) -> Iterator[_UserStringT]: ... # type: ignore[override]
def __reversed__(self: _UserStringT) -> Iterator[_UserStringT]: ... # type: ignore[override]
def __add__(self: _UserStringT, other: object) -> _UserStringT: ...
def __mul__(self: _UserStringT, n: int) -> _UserStringT: ...
def __mod__(self: _UserStringT, args: Any) -> _UserStringT: ...
@@ -170,7 +170,7 @@ class deque(MutableSequence[_T], Generic[_T]):
def extendleft(self, __iterable: Iterable[_T]) -> None: ...
def insert(self, __i: int, __x: _T) -> None: ...
def index(self, __x: _T, __start: int = ..., __stop: int = ...) -> int: ...
def pop(self) -> _T: ... # type: ignore
def pop(self) -> _T: ... # type: ignore[override]
def popleft(self) -> _T: ...
def remove(self, __value: _T) -> None: ...
def reverse(self) -> None: ...
@@ -212,7 +212,7 @@ class Counter(Dict[_T, int], Generic[_T]):
def elements(self) -> Iterator[_T]: ...
def most_common(self, n: int | None = ...) -> list[tuple[_T, int]]: ...
@classmethod
def fromkeys(cls, iterable: Any, v: int | None = ...) -> NoReturn: ... # type: ignore
def fromkeys(cls, iterable: Any, v: int | None = ...) -> NoReturn: ... # type: ignore[override]
@overload
def subtract(self, __iterable: None = ...) -> None: ...
@overload
@@ -233,13 +233,13 @@ class Counter(Dict[_T, int], Generic[_T]):
def __add__(self, other: Counter[_T]) -> Counter[_T]: ...
def __sub__(self, other: Counter[_T]) -> Counter[_T]: ...
def __and__(self, other: Counter[_T]) -> Counter[_T]: ...
def __or__(self, other: Counter[_T]) -> Counter[_T]: ... # type: ignore
def __or__(self, other: Counter[_T]) -> Counter[_T]: ... # type: ignore[override]
def __pos__(self) -> Counter[_T]: ...
def __neg__(self) -> Counter[_T]: ...
def __iadd__(self, other: Counter[_T]) -> Counter[_T]: ...
def __isub__(self, other: Counter[_T]) -> Counter[_T]: ...
def __iand__(self, other: Counter[_T]) -> Counter[_T]: ...
def __ior__(self, other: Counter[_T]) -> Counter[_T]: ... # type: ignore
def __ior__(self, other: Counter[_T]) -> Counter[_T]: ... # type: ignore[override]
@final
class _OrderedDictKeysView(dict_keys[_KT_co, _VT_co], Reversible[_KT_co]): # type: ignore[misc]