Skip to content

Commit 256eb9c

Browse files
committed
Revert "[_operator] Type mul and remove Anys that can be improved (#15598)"
1 parent 1c577fa commit 256eb9c

1 file changed

Lines changed: 27 additions & 30 deletions

File tree

mypy/typeshed/stdlib/_operator.pyi

Lines changed: 27 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import sys
2-
from _typeshed import SupportsGetItem, SupportsMod, SupportsMul, SupportsRMod, SupportsRMul
2+
from _typeshed import SupportsGetItem, SupportsMod, SupportsRMod
33
from collections.abc import Callable, Container, Iterable, MutableMapping, MutableSequence, Sequence
44
from operator import attrgetter as attrgetter, itemgetter as itemgetter, methodcaller as methodcaller
55
from typing import Any, AnyStr, Protocol, SupportsAbs, SupportsIndex, TypeVar, overload, type_check_only
@@ -59,30 +59,27 @@ def truth(a: object, /) -> bool: ...
5959
def is_(a: object, b: object, /) -> bool: ...
6060
def is_not(a: object, b: object, /) -> bool: ...
6161
def abs(a: SupportsAbs[_T], /) -> _T: ...
62-
def add(a, b, /): ...
63-
def and_(a, b, /): ...
64-
def floordiv(a, b, /): ...
62+
def add(a: Any, b: Any, /) -> Any: ...
63+
def and_(a: Any, b: Any, /) -> Any: ...
64+
def floordiv(a: Any, b: Any, /) -> Any: ...
6565
def index(a: SupportsIndex, /) -> int: ...
6666
def inv(a: _SupportsInversion[_T_co], /) -> _T_co: ...
6767
def invert(a: _SupportsInversion[_T_co], /) -> _T_co: ...
68-
def lshift(a, b, /): ...
68+
def lshift(a: Any, b: Any, /) -> Any: ...
6969
@overload
7070
def mod(a: SupportsMod[_T_contra, _T_co], b: _T_contra, /) -> _T_co: ...
7171
@overload
7272
def mod(a: _T_contra, b: SupportsRMod[_T_contra, _T_co], /) -> _T_co: ...
73-
@overload
74-
def mul(a: SupportsMul[_T_contra, _T_co], b: _T_contra, /) -> _T_co: ...
75-
@overload
76-
def mul(a: _T_contra, b: SupportsRMul[_T_contra, _T_co], /) -> _T_co: ...
77-
def matmul(a, b, /): ...
73+
def mul(a: Any, b: Any, /) -> Any: ...
74+
def matmul(a: Any, b: Any, /) -> Any: ...
7875
def neg(a: _SupportsNeg[_T_co], /) -> _T_co: ...
79-
def or_(a, b, /): ...
76+
def or_(a: Any, b: Any, /) -> Any: ...
8077
def pos(a: _SupportsPos[_T_co], /) -> _T_co: ...
81-
def pow(a, b, /): ...
82-
def rshift(a, b, /): ...
83-
def sub(a, b, /): ...
84-
def truediv(a, b, /): ...
85-
def xor(a, b, /): ...
78+
def pow(a: Any, b: Any, /) -> Any: ...
79+
def rshift(a: Any, b: Any, /) -> Any: ...
80+
def sub(a: Any, b: Any, /) -> Any: ...
81+
def truediv(a: Any, b: Any, /) -> Any: ...
82+
def xor(a: Any, b: Any, /) -> Any: ...
8683
def concat(a: Sequence[_T], b: Sequence[_T], /) -> Sequence[_T]: ...
8784
def contains(a: Container[object], b: object, /) -> bool: ...
8885
def countOf(a: Iterable[object], b: object, /) -> int: ...
@@ -104,20 +101,20 @@ def setitem(a: MutableSequence[_T], b: slice[int | None], c: Sequence[_T], /) ->
104101
@overload
105102
def setitem(a: MutableMapping[_K, _V], b: _K, c: _V, /) -> None: ...
106103
def length_hint(obj: object, default: int = 0, /) -> int: ...
107-
def iadd(a, b, /): ...
108-
def iand(a, b, /): ...
109-
def iconcat(a, b, /): ...
110-
def ifloordiv(a, b, /): ...
111-
def ilshift(a, b, /): ...
112-
def imod(a, b, /): ...
113-
def imul(a, b, /): ...
114-
def imatmul(a, b, /): ...
115-
def ior(a, b, /): ...
116-
def ipow(a, b, /): ...
117-
def irshift(a, b, /): ...
118-
def isub(a, b, /): ...
119-
def itruediv(a, b, /): ...
120-
def ixor(a, b, /): ...
104+
def iadd(a: Any, b: Any, /) -> Any: ...
105+
def iand(a: Any, b: Any, /) -> Any: ...
106+
def iconcat(a: Any, b: Any, /) -> Any: ...
107+
def ifloordiv(a: Any, b: Any, /) -> Any: ...
108+
def ilshift(a: Any, b: Any, /) -> Any: ...
109+
def imod(a: Any, b: Any, /) -> Any: ...
110+
def imul(a: Any, b: Any, /) -> Any: ...
111+
def imatmul(a: Any, b: Any, /) -> Any: ...
112+
def ior(a: Any, b: Any, /) -> Any: ...
113+
def ipow(a: Any, b: Any, /) -> Any: ...
114+
def irshift(a: Any, b: Any, /) -> Any: ...
115+
def isub(a: Any, b: Any, /) -> Any: ...
116+
def itruediv(a: Any, b: Any, /) -> Any: ...
117+
def ixor(a: Any, b: Any, /) -> Any: ...
121118

122119
if sys.version_info >= (3, 11):
123120
def call(obj: Callable[_P, _R], /, *args: _P.args, **kwargs: _P.kwargs) -> _R: ...

0 commit comments

Comments
 (0)