Skip to content

Commit 1c577fa

Browse files
committed
Revert "[_operator] Type add and sub (#15601)"
1 parent 804f674 commit 1c577fa

1 file changed

Lines changed: 3 additions & 19 deletions

File tree

mypy/typeshed/stdlib/_operator.pyi

Lines changed: 3 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,5 @@
11
import sys
2-
from _typeshed import (
3-
SupportsAdd,
4-
SupportsGetItem,
5-
SupportsMod,
6-
SupportsMul,
7-
SupportsRAdd,
8-
SupportsRMod,
9-
SupportsRMul,
10-
SupportsRSub,
11-
SupportsSub,
12-
)
2+
from _typeshed import SupportsGetItem, SupportsMod, SupportsMul, SupportsRMod, SupportsRMul
133
from collections.abc import Callable, Container, Iterable, MutableMapping, MutableSequence, Sequence
144
from operator import attrgetter as attrgetter, itemgetter as itemgetter, methodcaller as methodcaller
155
from typing import Any, AnyStr, Protocol, SupportsAbs, SupportsIndex, TypeVar, overload, type_check_only
@@ -69,10 +59,7 @@ def truth(a: object, /) -> bool: ...
6959
def is_(a: object, b: object, /) -> bool: ...
7060
def is_not(a: object, b: object, /) -> bool: ...
7161
def abs(a: SupportsAbs[_T], /) -> _T: ...
72-
@overload
73-
def add(a: SupportsAdd[_T_contra, _T_co], b: _T_contra, /) -> _T_co: ...
74-
@overload
75-
def add(a: _T_contra, b: SupportsRAdd[_T_contra, _T_co], /) -> _T_co: ...
62+
def add(a, b, /): ...
7663
def and_(a, b, /): ...
7764
def floordiv(a, b, /): ...
7865
def index(a: SupportsIndex, /) -> int: ...
@@ -93,10 +80,7 @@ def or_(a, b, /): ...
9380
def pos(a: _SupportsPos[_T_co], /) -> _T_co: ...
9481
def pow(a, b, /): ...
9582
def rshift(a, b, /): ...
96-
@overload
97-
def sub(a: SupportsSub[_T_contra, _T_co], b: _T_contra, /) -> _T_co: ...
98-
@overload
99-
def sub(a: _T_contra, b: SupportsRSub[_T_contra, _T_co], /) -> _T_co: ...
83+
def sub(a, b, /): ...
10084
def truediv(a, b, /): ...
10185
def xor(a, b, /): ...
10286
def concat(a: Sequence[_T], b: Sequence[_T], /) -> Sequence[_T]: ...

0 commit comments

Comments
 (0)