rewrite _operator stubs (#1196)

Fixes #835
This commit is contained in:
Jelle Zijlstra
2017-04-24 15:04:42 -07:00
committed by Łukasz Langa
parent 4ea4bf63f8
commit 56bc0f5766

View File

@@ -1,71 +1,65 @@
# Stubs for _operator (Python 3.5)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
def _compare_digest(*args, **kwargs): ...
def abs(a): ...
def add(a, b): ...
def and_(a, b): ...
def concat(a, b): ...
def contains(a, b): ...
def countOf(a, b): ...
def delitem(a, b): ...
def eq(a, b): ...
def floordiv(a, b): ...
def ge(a, b): ...
def getitem(a, b): ...
def gt(a, b): ...
def iadd(*args, **kwargs): ...
def iand(*args, **kwargs): ...
def iconcat(*args, **kwargs): ...
def ifloordiv(*args, **kwargs): ...
def ilshift(*args, **kwargs): ...
def imatmul(*args, **kwargs): ...
def imod(*args, **kwargs): ...
def imul(*args, **kwargs): ...
def index(a): ...
def indexOf(a, b): ...
def inv(a): ...
def invert(a): ...
def ior(*args, **kwargs): ...
def ipow(*args, **kwargs): ...
def irshift(*args, **kwargs): ...
def is_(a, b): ...
def is_not(a, b): ...
def isub(*args, **kwargs): ...
def itruediv(*args, **kwargs): ...
def ixor(*args, **kwargs): ...
def le(a, b): ...
def length_hint(obj, default=0): ...
def lshift(a, b): ...
def lt(a, b): ...
def matmul(a, b): ...
def mod(a, b): ...
def mul(a, b): ...
def ne(a, b): ...
def neg(a): ...
def not_(a): ...
def or_(a, b): ...
def pos(a): ...
def pow(a, b): ...
def rshift(a, b): ...
def setitem(a, b, c): ...
def sub(a, b): ...
def truediv(a, b): ...
def truth(a): ...
def xor(a, b): ...
import sys
from typing import AnyStr
class attrgetter:
def __init__(self, *args, **kwargs): ...
def __call__(self, *args, **kwargs): ...
def __reduce__(self): ...
# In reality the import is the other way around, but this way we can keep the operator stub in 2and3
from operator import (
truth as truth,
contains as contains,
indexOf as indexOf,
countOf as countOf,
is_ as is_,
is_not as is_not,
index as index,
add as add,
sub as sub,
mul as mul,
floordiv as floordiv,
truediv as truediv,
mod as mod,
neg as neg,
pos as pos,
abs as abs,
inv as inv,
invert as invert,
lshift as lshift,
rshift as rshift,
not_ as not_,
and_ as and_,
xor as xor,
or_ as or_,
iadd as iadd,
isub as isub,
imul as imul,
ifloordiv as ifloordiv,
itruediv as itruediv,
imod as imod,
ilshift as ilshift,
irshift as irshift,
iand as iand,
ixor as ixor,
ior as ior,
concat as concat,
iconcat as iconcat,
getitem as getitem,
setitem as setitem,
delitem as delitem,
pow as pow,
ipow as ipow,
eq as eq,
ne as ne,
lt as lt,
le as le,
gt as gt,
ge as ge,
itemgetter as itemgetter,
attrgetter as attrgetter,
methodcaller as methodcaller,
)
if sys.version_info >= (3, 5):
from operator import matmul as matmul, imatmul as imatmul
if sys.version_info >= (3, 4):
from operator import length_hint as length_hint
class itemgetter:
def __init__(self, *args, **kwargs): ...
def __call__(self, *args, **kwargs): ...
def __reduce__(self): ...
class methodcaller:
def __init__(self, *args, **kwargs): ...
def __call__(self, *args, **kwargs): ...
def __reduce__(self): ...
def _compare_digest(a: AnyStr, b: AnyStr) -> bool: ...