mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-05-04 04:25:50 +08:00
[_operator] Type add and sub (#15601)
This commit is contained in:
+19
-3
@@ -1,5 +1,15 @@
|
||||
import sys
|
||||
from _typeshed import SupportsGetItem, SupportsMod, SupportsMul, SupportsRMod, SupportsRMul
|
||||
from _typeshed import (
|
||||
SupportsAdd,
|
||||
SupportsGetItem,
|
||||
SupportsMod,
|
||||
SupportsMul,
|
||||
SupportsRAdd,
|
||||
SupportsRMod,
|
||||
SupportsRMul,
|
||||
SupportsRSub,
|
||||
SupportsSub,
|
||||
)
|
||||
from collections.abc import Callable, Container, Iterable, MutableMapping, MutableSequence, Sequence
|
||||
from operator import attrgetter as attrgetter, itemgetter as itemgetter, methodcaller as methodcaller
|
||||
from typing import Any, AnyStr, Protocol, SupportsAbs, SupportsIndex, TypeVar, overload, type_check_only
|
||||
@@ -59,7 +69,10 @@ def truth(a: object, /) -> bool: ...
|
||||
def is_(a: object, b: object, /) -> bool: ...
|
||||
def is_not(a: object, b: object, /) -> bool: ...
|
||||
def abs(a: SupportsAbs[_T], /) -> _T: ...
|
||||
def add(a, b, /): ...
|
||||
@overload
|
||||
def add(a: SupportsAdd[_T_contra, _T_co], b: _T_contra, /) -> _T_co: ...
|
||||
@overload
|
||||
def add(a: _T_contra, b: SupportsRAdd[_T_contra, _T_co], /) -> _T_co: ...
|
||||
def and_(a, b, /): ...
|
||||
def floordiv(a, b, /): ...
|
||||
def index(a: SupportsIndex, /) -> int: ...
|
||||
@@ -80,7 +93,10 @@ def or_(a, b, /): ...
|
||||
def pos(a: _SupportsPos[_T_co], /) -> _T_co: ...
|
||||
def pow(a, b, /): ...
|
||||
def rshift(a, b, /): ...
|
||||
def sub(a, b, /): ...
|
||||
@overload
|
||||
def sub(a: SupportsSub[_T_contra, _T_co], b: _T_contra, /) -> _T_co: ...
|
||||
@overload
|
||||
def sub(a: _T_contra, b: SupportsRSub[_T_contra, _T_co], /) -> _T_co: ...
|
||||
def truediv(a, b, /): ...
|
||||
def xor(a, b, /): ...
|
||||
def concat(a: Sequence[_T], b: Sequence[_T], /) -> Sequence[_T]: ...
|
||||
|
||||
Reference in New Issue
Block a user