|
1 | 1 | import sys |
2 | 2 | from _collections_abc import dict_items, dict_keys, dict_values |
3 | | -from _typeshed import SupportsKeysAndGetItem, SupportsRichComparison, SupportsRichComparisonT |
| 3 | +from _typeshed import SupportsItems, SupportsKeysAndGetItem, SupportsRichComparison, SupportsRichComparisonT |
4 | 4 | from typing import Any, Generic, NoReturn, TypeVar, overload |
5 | 5 | from typing_extensions import Self, SupportsIndex, final |
6 | 6 |
|
@@ -299,10 +299,10 @@ class Counter(dict[_T, int], Generic[_T]): |
299 | 299 | def __pos__(self) -> Counter[_T]: ... |
300 | 300 | def __neg__(self) -> Counter[_T]: ... |
301 | 301 | # several type: ignores because __iadd__ is supposedly incompatible with __add__, etc. |
302 | | - def __iadd__(self, other: Counter[_T]) -> Self: ... # type: ignore[misc] |
303 | | - def __isub__(self, other: Counter[_T]) -> Self: ... |
304 | | - def __iand__(self, other: Counter[_T]) -> Self: ... |
305 | | - def __ior__(self, other: Counter[_T]) -> Self: ... # type: ignore[override,misc] |
| 302 | + def __iadd__(self, other: SupportsItems[_T, int]) -> Self: ... # type: ignore[misc] |
| 303 | + def __isub__(self, other: SupportsItems[_T, int]) -> Self: ... |
| 304 | + def __iand__(self, other: SupportsItems[_T, int]) -> Self: ... |
| 305 | + def __ior__(self, other: SupportsItems[_T, int]) -> Self: ... # type: ignore[override,misc] |
306 | 306 | if sys.version_info >= (3, 10): |
307 | 307 | def total(self) -> int: ... |
308 | 308 | def __le__(self, other: Counter[Any]) -> bool: ... |
|
0 commit comments