mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-01-02 01:23:24 +08:00
Add mypy error codes to '# type: ignore' comments (#6379)
This commit is contained in:
@@ -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]
|
||||
|
||||
Reference in New Issue
Block a user