From 231d854ef3320d4bf4de88570c39c973deaa2760 Mon Sep 17 00:00:00 2001 From: Matthias Kramm Date: Thu, 12 Mar 2015 14:21:08 -0700 Subject: [PATCH] add some Python 2 modules --- python2/.donotremove | 0 python2/_bisect.py | 15 +++ python2/_functools.py | 11 ++ python2/_heapq.py | 24 +++++ python2/_hotshot.py | 31 ++++++ python2/_sre.py | 50 +++++++++ python2/array.py | 53 ++++++++++ python2/cmath.py | 45 ++++++++ python2/datetime.py | 73 +++++++++++++ python2/gc.py | 30 ++++++ python2/math.py | 87 ++++++++++++++++ python2/operator.py | 233 ++++++++++++++++++++++++++++++++++++++++++ python2/signal.py | 72 +++++++++++++ python2/strop.py | 80 +++++++++++++++ python2/time.py | 31 ++++++ python2/zlib.py | 28 +++++ 16 files changed, 863 insertions(+) delete mode 100644 python2/.donotremove create mode 100644 python2/_bisect.py create mode 100644 python2/_functools.py create mode 100644 python2/_heapq.py create mode 100644 python2/_hotshot.py create mode 100644 python2/_sre.py create mode 100644 python2/array.py create mode 100644 python2/cmath.py create mode 100644 python2/datetime.py create mode 100644 python2/gc.py create mode 100644 python2/math.py create mode 100644 python2/operator.py create mode 100644 python2/signal.py create mode 100644 python2/strop.py create mode 100644 python2/time.py create mode 100644 python2/zlib.py diff --git a/python2/.donotremove b/python2/.donotremove deleted file mode 100644 index e69de29bb..000000000 diff --git a/python2/_bisect.py b/python2/_bisect.py new file mode 100644 index 000000000..3a68ac46d --- /dev/null +++ b/python2/_bisect.py @@ -0,0 +1,15 @@ +# This is an autogenerated file. It serves as a starting point +# for a more percise manual annotation of this module. +# Feel free to edit the source below, but remove this header when you do. + +def bisect_left(a, x, *args, **kwargs) -> int: pass + +def insort_right(a, x, *args, **kwargs) -> NoneType: pass + +def bisect_right(a, x, *args, **kwargs) -> int: pass + +def insort(a, x, *args, **kwargs) -> NoneType: pass + +def insort_left(a, x, *args, **kwargs) -> NoneType: pass + +def bisect(a, x, *args, **kwargs) -> int: pass diff --git a/python2/_functools.py b/python2/_functools.py new file mode 100644 index 000000000..aa373118e --- /dev/null +++ b/python2/_functools.py @@ -0,0 +1,11 @@ +# This is an autogenerated file. It serves as a starting point +# for a more percise manual annotation of this module. +# Feel free to edit the source below, but remove this header when you do. + +def reduce(*args, **kwargs) -> object: + raise TypeError() + + +class partial(object): + def __reduce__() -> tuple: pass + def __setstate__(a, b, c, d) -> NoneType: pass diff --git a/python2/_heapq.py b/python2/_heapq.py new file mode 100644 index 000000000..e63f0a0a5 --- /dev/null +++ b/python2/_heapq.py @@ -0,0 +1,24 @@ +# This is an autogenerated file. It serves as a starting point +# for a more percise manual annotation of this module. +# Feel free to edit the source below, but remove this header when you do. + +def heappushpop(*args, **kwargs) -> object: + raise TypeError() + +def heappop(*args, **kwargs) -> object: + raise IndexError() + raise TypeError() + +def nlargest(a: int, b) -> List[object]: pass + +def heapreplace(*args, **kwargs) -> object: + raise IndexError() + raise TypeError() + +def heapify(*args, **kwargs) -> NoneType: + raise TypeError() + +def heappush(*args, **kwargs) -> NoneType: + raise TypeError() + +def nsmallest(a: int, b) -> List[object]: pass diff --git a/python2/_hotshot.py b/python2/_hotshot.py new file mode 100644 index 000000000..f27344eb6 --- /dev/null +++ b/python2/_hotshot.py @@ -0,0 +1,31 @@ +# This is an autogenerated file. It serves as a starting point +# for a more percise manual annotation of this module. +# Feel free to edit the source below, but remove this header when you do. + +def profiler(a: str, *args, **kwargs) -> object: + raise IOError() + +def coverage(a: str) -> object: pass + +def logreader(a: str) -> LogReaderType: + raise IOError() + raise RuntimeError() + +def resolution() -> tuple: pass + + +class LogReaderType(object): + def close() -> NoneType: pass + def fileno() -> int: + raise ValueError() + +class ProfilerType(object): + def addinfo(a: str, b: str) -> NoneType: pass + def close() -> NoneType: pass + def fileno() -> int: + raise ValueError() + def runcall(*args, **kwargs) -> object: pass + def runcode(a, b, *args, **kwargs) -> object: + raise TypeError() + def start() -> NoneType: pass + def stop() -> NoneType: pass diff --git a/python2/_sre.py b/python2/_sre.py new file mode 100644 index 000000000..c4733442d --- /dev/null +++ b/python2/_sre.py @@ -0,0 +1,50 @@ +# This is an autogenerated file. It serves as a starting point +# for a more percise manual annotation of this module. +# Feel free to edit the source below, but remove this header when you do. + +MAGIC = Undefined(int) +MAXREPEAT = Undefined(long) +CODESIZE = Undefined(int) +copyright = Undefined(str) + +def getlower(a: int, b: int) -> int: pass + +def compile(a, b: int, c, *args, **kwargs) -> SRE_Pattern: + raise OverflowError() + +def getcodesize() -> int: pass + + +class SRE_Match(object): + def group(*args, **kwargs) -> tuple: pass + def start(*args, **kwargs) -> int: + raise IndexError() + def end(*args, **kwargs) -> int: + raise IndexError() + def span(*args, **kwargs) -> tuple: + raise IndexError() + def groups(*args, **kwargs) -> tuple: pass + def groupdict(*args, **kwargs) -> dict: pass + def expand(*args, **kwargs) -> object: pass + def __copy__() -> object: + raise TypeError() + def __deepcopy__(*args, **kwargs) -> object: + raise TypeError() + +class SRE_Pattern(object): + def match(pattern, *args, **kwargs) -> object: pass + def search(pattern, *args, **kwargs) -> object: pass + def sub(repl, string, *args, **kwargs) -> tuple: pass + def subn(repl, string, *args, **kwargs) -> tuple: pass + def split(source, *args, **kwargs) -> List[NoneType]: pass + def findall(source, *args, **kwargs) -> List[tuple]: pass + def finditer(*args, **kwargs) -> callable_iterator: pass + def scanner(a, *args, **kwargs) -> SRE_Scanner: pass + def __copy__() -> object: + raise TypeError() + def __deepcopy__(*args, **kwargs) -> object: + raise TypeError() + +class SRE_Scanner(object): + def match() -> object: pass + def search() -> object: pass diff --git a/python2/array.py b/python2/array.py new file mode 100644 index 000000000..7a53a6a79 --- /dev/null +++ b/python2/array.py @@ -0,0 +1,53 @@ +# This is an autogenerated file. It serves as a starting point +# for a more percise manual annotation of this module. +# Feel free to edit the source below, but remove this header when you do. + +class array(object): + def append(*args, **kwargs) -> NoneType: pass + def buffer_info() -> tuple: pass + def byteswap() -> NoneType: + raise RuntimeError() + def __copy__() -> object: pass + def count(*args, **kwargs) -> int: pass + def __deepcopy__(*args, **kwargs) -> object: pass + def extend(*args, **kwargs) -> NoneType: pass + def fromfile(a, b: int) -> NoneType: + raise IOError() + raise MemoryError() + raise TypeError() + raise EOFError() + def fromlist(*args, **kwargs) -> NoneType: + raise MemoryError() + raise TypeError() + def fromstring(a: Nothing) -> NoneType: + raise MemoryError() + raise ValueError() + def fromunicode(a: str) -> NoneType: + raise MemoryError() + raise ValueError() + def index(*args, **kwargs) -> int: + raise ValueError() + def insert(a: int, b) -> NoneType: pass + def pop(*args, **kwargs) -> object: + raise IndexError() + def read(*args, **kwargs) -> NoneType: + raise DeprecationWarning() + def __reduce__() -> tuple: + raise AttributeError() + def remove(*args, **kwargs) -> NoneType: + raise ValueError() + def reverse() -> NoneType: pass + def tofile(*args, **kwargs) -> NoneType: + raise IOError() + raise TypeError() + def tolist() -> list: pass + def tostring() -> str: + raise MemoryError() + def tounicode() -> unicode: + raise ValueError() + def write(*args, **kwargs) -> NoneType: + raise DeprecationWarning() + def __sizeof__() -> long: pass + +class arrayiterator(object): + pass diff --git a/python2/cmath.py b/python2/cmath.py new file mode 100644 index 000000000..9a8dbfa5b --- /dev/null +++ b/python2/cmath.py @@ -0,0 +1,45 @@ +# This is an autogenerated file. It serves as a starting point +# for a more percise manual annotation of this module. +# Feel free to edit the source below, but remove this header when you do. + +def polar(a: complex) -> tuple: pass + +def acos(*args, **kwargs) -> complex: pass + +def acosh(*args, **kwargs) -> complex: pass + +def isnan(a: complex) -> bool: pass + +def sqrt(*args, **kwargs) -> complex: pass + +def rect(a: float, b: float) -> complex: pass + +def atan(*args, **kwargs) -> complex: pass + +def atanh(*args, **kwargs) -> complex: pass + +def cos(*args, **kwargs) -> complex: pass + +def tanh(*args, **kwargs) -> complex: pass + +def cosh(*args, **kwargs) -> complex: pass + +def sinh(*args, **kwargs) -> complex: pass + +def log(a: complex, *args, **kwargs) -> complex: pass + +def log10(*args, **kwargs) -> complex: pass + +def phase(a: complex) -> float: pass + +def isinf(a: complex) -> bool: pass + +def exp(*args, **kwargs) -> complex: pass + +def tan(*args, **kwargs) -> complex: pass + +def sin(*args, **kwargs) -> complex: pass + +def asin(*args, **kwargs) -> complex: pass + +def asinh(*args, **kwargs) -> complex: pass diff --git a/python2/datetime.py b/python2/datetime.py new file mode 100644 index 000000000..847890ecf --- /dev/null +++ b/python2/datetime.py @@ -0,0 +1,73 @@ +# This is an autogenerated file. It serves as a starting point +# for a more percise manual annotation of this module. +# Feel free to edit the source below, but remove this header when you do. + +min = Undefined(object) +max = Undefined(object) +resolution = Undefined(object) + +class tzinfo(object): + def tzname(*args, **kwargs) -> object: pass + def utcoffset(*args, **kwargs) -> object: pass + def dst(*args, **kwargs) -> object: pass + def fromutc(*args, **kwargs) -> object: + raise TypeError() + raise ValueError() + def __reduce__() -> tuple: pass + +class time(object): + def isoformat() -> str: pass + def strftime(format: Nothing) -> object: pass + def __format__(a) -> unicode: + raise ValueError() + def utcoffset() -> object: pass + def tzname() -> object: pass + def dst() -> object: pass + def replace(*args, **kwargs) -> object: pass + def __reduce__() -> tuple: pass + +class timedelta(object): + def total_seconds() -> int: pass + def __reduce__() -> tuple: pass + +class datetime(object): + def now(*args, **kwargs) -> object: pass + def utcnow() -> object: pass + def fromtimestamp(timestamp: float, *args, **kwargs) -> object: pass + def utcfromtimestamp(a: float) -> object: pass + def strptime(a: str, b: str) -> object: + raise ValueError() + def combine(date, time) -> object: pass + def date() -> object: pass + def time() -> object: pass + def timetz() -> object: pass + def ctime() -> str: pass + def timetuple() -> object: pass + def utctimetuple() -> object: + raise OverflowError() + def isoformat(*args, **kwargs) -> str: pass + def utcoffset() -> object: pass + def tzname() -> object: pass + def dst() -> object: pass + def replace(*args, **kwargs) -> object: pass + def astimezone(tz) -> object: + raise ValueError() + def __reduce__() -> tuple: pass + +class date(object): + def fromtimestamp(a: float) -> object: pass + def fromordinal(a: int) -> object: + raise ValueError() + def today() -> object: pass + def ctime() -> str: pass + def strftime(format: Nothing) -> object: pass + def __format__(a) -> unicode: + raise ValueError() + def timetuple() -> object: pass + def isocalendar() -> tuple: pass + def isoformat() -> str: pass + def isoweekday() -> int: pass + def toordinal() -> int: pass + def weekday() -> int: pass + def replace(*args, **kwargs) -> object: pass + def __reduce__() -> tuple: pass diff --git a/python2/gc.py b/python2/gc.py new file mode 100644 index 000000000..d84fc49ea --- /dev/null +++ b/python2/gc.py @@ -0,0 +1,30 @@ +# This is an autogenerated file. It serves as a starting point +# for a more percise manual annotation of this module. +# Feel free to edit the source below, but remove this header when you do. + +def set_debug(a: int) -> NoneType: pass + +def get_threshold() -> tuple: pass + +def collect(*args, **kwargs) -> int: + raise ValueError() + +def is_tracked(*args, **kwargs) -> bool: pass + +def get_referents(*args, **kwargs) -> list: pass + +def isenabled() -> bool: pass + +def set_threshold(a: int, *args, **kwargs) -> NoneType: pass + +def get_debug() -> int: pass + +def disable() -> NoneType: pass + +def get_count() -> tuple: pass + +def enable() -> NoneType: pass + +def get_objects() -> list: pass + +def get_referrers(*args, **kwargs) -> list: pass diff --git a/python2/math.py b/python2/math.py new file mode 100644 index 000000000..2cafd2ab1 --- /dev/null +++ b/python2/math.py @@ -0,0 +1,87 @@ +# This is an autogenerated file. It serves as a starting point +# for a more percise manual annotation of this module. +# Feel free to edit the source below, but remove this header when you do. + +def acos(*args, **kwargs) -> float: pass + +def ldexp(a: float, b) -> float: + raise TypeError() + +def floor(*args, **kwargs) -> float: pass + +def trunc(*args, **kwargs) -> object: pass + +def fsum(*args, **kwargs) -> float: + raise OverflowError() + raise ValueError() + +def fmod(*args, **kwargs) -> float: pass + +def atan2(*args, **kwargs) -> float: pass + +def erf(*args, **kwargs) -> float: pass + +def sqrt(*args, **kwargs) -> float: pass + +def tan(*args, **kwargs) -> float: pass + +def pow(*args, **kwargs) -> float: pass + +def copysign(*args, **kwargs) -> float: pass + +def log1p(*args, **kwargs) -> float: pass + +def expm1(*args, **kwargs) -> float: pass + +def exp(*args, **kwargs) -> float: pass + +def radians(*args, **kwargs) -> float: pass + +def degrees(*args, **kwargs) -> float: pass + +def asinh(*args, **kwargs) -> float: pass + +def isnan(*args, **kwargs) -> bool: pass + +def lgamma(*args, **kwargs) -> float: pass + +def atan(*args, **kwargs) -> float: pass + +def atanh(*args, **kwargs) -> float: pass + +def hypot(*args, **kwargs) -> float: pass + +def ceil(*args, **kwargs) -> float: pass + +def erfc(*args, **kwargs) -> float: pass + +def isinf(*args, **kwargs) -> bool: pass + +def fabs(*args, **kwargs) -> float: pass + +def sinh(*args, **kwargs) -> float: pass + +def tanh(*args, **kwargs) -> float: pass + +def asin(*args, **kwargs) -> float: pass + +def cosh(*args, **kwargs) -> float: pass + +def acosh(*args, **kwargs) -> float: pass + +def modf(*args, **kwargs) -> tuple: pass + +def frexp(*args, **kwargs) -> tuple: pass + +def cos(*args, **kwargs) -> float: pass + +def sin(*args, **kwargs) -> float: pass + +def log(*args, **kwargs) -> float: pass + +def log10(*args, **kwargs) -> float: pass + +def factorial(*args, **kwargs) -> int: + raise ValueError() + +def gamma(*args, **kwargs) -> float: pass diff --git a/python2/operator.py b/python2/operator.py new file mode 100644 index 000000000..72b90fae4 --- /dev/null +++ b/python2/operator.py @@ -0,0 +1,233 @@ +# This is an autogenerated file. It serves as a starting point +# for a more percise manual annotation of this module. +# Feel free to edit the source below, but remove this header when you do. + +def __xor__(*args, **kwargs) -> object: pass + +def iconcat(*args, **kwargs) -> object: pass + +def __ifloordiv__(*args, **kwargs) -> object: pass + +def __iand__(*args, **kwargs) -> object: pass + +def __mul__(*args, **kwargs) -> object: pass + +def __delitem__(*args, **kwargs) -> NoneType: pass + +def delslice(a, b: int, c: int) -> NoneType: pass + +def sub(*args, **kwargs) -> object: pass + +def iadd(*args, **kwargs) -> object: pass + +def floordiv(*args, **kwargs) -> object: pass + +def pos(*args, **kwargs) -> object: pass + +def abs(*args, **kwargs) -> object: pass + +def is_(*args, **kwargs) -> bool: pass + +def ifloordiv(*args, **kwargs) -> object: pass + +def __inv__(*args, **kwargs) -> object: pass + +def __gt__(*args, **kwargs) -> object: pass + +def __add__(*args, **kwargs) -> object: pass + +def le(*args, **kwargs) -> object: pass + +def __setitem__(*args, **kwargs) -> NoneType: pass + +def imod(*args, **kwargs) -> object: pass + +def lt(*args, **kwargs) -> object: pass + +def __and__(*args, **kwargs) -> object: pass + +def __getitem__(*args, **kwargs) -> object: pass + +def __le__(*args, **kwargs) -> object: pass + +def getitem(*args, **kwargs) -> object: pass + +def __iadd__(*args, **kwargs) -> object: pass + +def __not__(*args, **kwargs) -> bool: pass + +def __itruediv__(*args, **kwargs) -> object: pass + +def __index__(*args, **kwargs) -> object: pass + +def iand(*args, **kwargs) -> object: pass + +def irshift(*args, **kwargs) -> object: pass + +def __truediv__(*args, **kwargs) -> object: pass + +def __delslice__(a, b: int, c: int) -> NoneType: pass + +def setslice(a, b: int, c: int, d) -> NoneType: pass + +def neg(*args, **kwargs) -> object: pass + +def __invert__(*args, **kwargs) -> object: pass + +def __neg__(*args, **kwargs) -> object: pass + +def truediv(*args, **kwargs) -> object: pass + +def pow(*args, **kwargs) -> object: pass + +def __sub__(*args, **kwargs) -> object: pass + +def and_(*args, **kwargs) -> object: pass + +def __pos__(*args, **kwargs) -> object: pass + +def __ipow__(*args, **kwargs) -> object: pass + +def repeat(a, b: int) -> object: pass + +def __setslice__(a, b: int, c: int, d) -> NoneType: pass + +def isSequenceType(*args, **kwargs) -> bool: pass + +def ne(*args, **kwargs) -> object: pass + +def __imul__(*args, **kwargs) -> object: pass + +def __ior__(*args, **kwargs) -> object: pass + +def is_not(*args, **kwargs) -> bool: pass + +def isub(*args, **kwargs) -> object: pass + +def eq(*args, **kwargs) -> object: pass + +def __ne__(*args, **kwargs) -> object: pass + +def __pow__(*args, **kwargs) -> object: pass + +def __eq__(*args, **kwargs) -> object: pass + +def lshift(*args, **kwargs) -> object: pass + +def concat(*args, **kwargs) -> object: pass + +def __or__(*args, **kwargs) -> object: pass + +def div(*args, **kwargs) -> object: pass + +def __isub__(*args, **kwargs) -> object: pass + +def setitem(*args, **kwargs) -> NoneType: pass + +def index(*args, **kwargs) -> object: pass + +def __contains__(*args, **kwargs) -> bool: pass + +def or_(*args, **kwargs) -> object: pass + +def __getslice__(a, b: int, c: int) -> object: pass + +def rshift(*args, **kwargs) -> object: pass + +def ipow(*args, **kwargs) -> object: pass + +def ilshift(*args, **kwargs) -> object: pass + +def ior(*args, **kwargs) -> object: pass + +def ixor(*args, **kwargs) -> object: pass + +def delitem(*args, **kwargs) -> NoneType: pass + +def irepeat(a, b: int) -> object: pass + +def __ilshift__(*args, **kwargs) -> object: pass + +def xor(*args, **kwargs) -> object: pass + +def countOf(*args, **kwargs) -> int: pass + +def __lt__(*args, **kwargs) -> object: pass + +def __rshift__(*args, **kwargs) -> object: pass + +def __iconcat__(*args, **kwargs) -> object: pass + +def __floordiv__(*args, **kwargs) -> object: pass + +def __irepeat__(a, b: int) -> object: pass + +def contains(*args, **kwargs) -> bool: pass + +def __div__(*args, **kwargs) -> object: pass + +def __imod__(*args, **kwargs) -> object: pass + +def __concat__(*args, **kwargs) -> object: pass + +def gt(*args, **kwargs) -> object: pass + +def __mod__(*args, **kwargs) -> object: pass + +def inv(*args, **kwargs) -> object: pass + +def __ixor__(*args, **kwargs) -> object: pass + +def ge(*args, **kwargs) -> object: pass + +def __lshift__(*args, **kwargs) -> object: pass + +def __repeat__(a, b: int) -> object: pass + +def invert(*args, **kwargs) -> object: pass + +def __idiv__(*args, **kwargs) -> object: pass + +def __abs__(*args, **kwargs) -> object: pass + +def __ge__(*args, **kwargs) -> object: pass + +def mul(*args, **kwargs) -> object: pass + +def sequenceIncludes(*args, **kwargs) -> bool: pass + +def isNumberType(*args, **kwargs) -> bool: pass + +def itruediv(*args, **kwargs) -> object: pass + +def truth(*args, **kwargs) -> bool: pass + +def add(*args, **kwargs) -> object: pass + +def indexOf(*args, **kwargs) -> int: pass + +def __irshift__(*args, **kwargs) -> object: pass + +def imul(*args, **kwargs) -> object: pass + +def getslice(a, b: int, c: int) -> object: pass + +def not_(*args, **kwargs) -> bool: pass + +def isMappingType(*args, **kwargs) -> bool: pass + +def idiv(*args, **kwargs) -> object: pass + +def mod(*args, **kwargs) -> object: pass + +def isCallable(*args, **kwargs) -> bool: pass + + +class itemgetter(object): + pass + +class attrgetter(object): + pass + +class methodcaller(object): + pass diff --git a/python2/signal.py b/python2/signal.py new file mode 100644 index 000000000..3af13fc4f --- /dev/null +++ b/python2/signal.py @@ -0,0 +1,72 @@ +# This is an autogenerated file. It serves as a starting point +# for a more percise manual annotation of this module. +# Feel free to edit the source below, but remove this header when you do. + +SIGTTIN = Undefined(int) +SIGTSTP = Undefined(int) +SIGPIPE = Undefined(int) +SIGXCPU = Undefined(int) +SIGIOT = Undefined(int) +SIGALRM = Undefined(int) +SIGRTMAX = Undefined(int) +SIGPWR = Undefined(int) +SIGTTOU = Undefined(int) +SIGSEGV = Undefined(int) +SIGRTMIN = Undefined(int) +SIGKILL = Undefined(int) +SIGBUS = Undefined(int) +SIGVTALRM = Undefined(int) +SIGCHLD = Undefined(int) +SIGABRT = Undefined(int) +SIGSTOP = Undefined(int) +SIGPOLL = Undefined(int) +SIGHUP = Undefined(int) +SIG_DFL = Undefined(long) +SIGSYS = Undefined(int) +SIGPROF = Undefined(int) +NSIG = Undefined(int) +SIGTERM = Undefined(int) +SIGINT = Undefined(int) +ITIMER_PROF = Undefined(long) +SIG_IGN = Undefined(long) +SIGURG = Undefined(int) +SIGIO = Undefined(int) +SIGILL = Undefined(int) +SIGQUIT = Undefined(int) +ITIMER_VIRTUAL = Undefined(long) +SIGTRAP = Undefined(int) +SIGUSR2 = Undefined(int) +SIGUSR1 = Undefined(int) +ItimerError = Undefined(object) +SIGWINCH = Undefined(int) +SIGXFSZ = Undefined(int) +SIGCONT = Undefined(int) +SIGFPE = Undefined(int) +ITIMER_REAL = Undefined(long) +SIGCLD = Undefined(int) + +def getitimer(a: int) -> tuple: pass + +def signal(a: int, b) -> NoneType: + raise RuntimeError() + raise ValueError() + raise TypeError() + +def getsignal(a: int) -> NoneType: + raise ValueError() + +def pause() -> NoneType: pass + +def setitimer(a: int, b: float, *args, **kwargs) -> tuple: pass + +def alarm(a: int) -> int: pass + +def set_wakeup_fd(a: int) -> long: + raise ValueError() + +def siginterrupt(a: int, b: int) -> NoneType: + raise RuntimeError() + raise ValueError() + +def default_int_handler(*args, **kwargs) -> object: + raise KeyboardInterrupt() diff --git a/python2/strop.py b/python2/strop.py new file mode 100644 index 000000000..1bdecd846 --- /dev/null +++ b/python2/strop.py @@ -0,0 +1,80 @@ +# This is an autogenerated file. It serves as a starting point +# for a more percise manual annotation of this module. +# Feel free to edit the source below, but remove this header when you do. + +def atoi(a: str, *args, **kwargs) -> int: + raise ValueError() + raise DeprecationWarning() + +def split(*args, **kwargs) -> List[str]: + raise ValueError() + raise DeprecationWarning() + +def joinfields(*args, **kwargs) -> object: + raise OverflowError() + raise TypeError() + raise DeprecationWarning() + +def lower(*args, **kwargs) -> str: + raise DeprecationWarning() + +def lstrip(*args, **kwargs) -> str: + raise DeprecationWarning() + +def atol(a: str, *args, **kwargs) -> long: + raise ValueError() + raise DeprecationWarning() + +def upper(*args, **kwargs) -> str: + raise DeprecationWarning() + +def expandtabs(a: Nothing, *args, **kwargs) -> str: + raise OverflowError() + raise ValueError() + raise DeprecationWarning() + +def translate(*args, **kwargs) -> str: + raise ValueError() + raise DeprecationWarning() + +def capitalize(*args, **kwargs) -> str: + raise DeprecationWarning() + +def find(*args, **kwargs) -> int: + raise DeprecationWarning() + +def join(*args, **kwargs) -> object: + raise OverflowError() + raise TypeError() + raise DeprecationWarning() + +def count(*args, **kwargs) -> int: + raise DeprecationWarning() + +def swapcase(*args, **kwargs) -> str: + raise DeprecationWarning() + +def maketrans(*args, **kwargs) -> str: + raise ValueError() + +def rstrip(*args, **kwargs) -> str: + raise DeprecationWarning() + +def strip(*args, **kwargs) -> str: + raise DeprecationWarning() + +def atof(a: str) -> float: + raise ValueError() + raise DeprecationWarning() + +def splitfields(*args, **kwargs) -> List[str]: + raise ValueError() + raise DeprecationWarning() + +def replace(*args, **kwargs) -> str: + raise MemoryError() + raise ValueError() + raise DeprecationWarning() + +def rfind(*args, **kwargs) -> int: + raise DeprecationWarning() diff --git a/python2/time.py b/python2/time.py new file mode 100644 index 000000000..90849313d --- /dev/null +++ b/python2/time.py @@ -0,0 +1,31 @@ +# This is an autogenerated file. It serves as a starting point +# for a more percise manual annotation of this module. +# Feel free to edit the source below, but remove this header when you do. + +def ctime(*args, **kwargs) -> str: + raise ValueError() + +def strptime(*args, **kwargs) -> object: pass + +def strftime(a: str, *args, **kwargs) -> str: + raise MemoryError() + raise ValueError() + +def tzset() -> NoneType: pass + +def time() -> float: + raise IOError() + +def mktime(*args, **kwargs) -> float: + raise OverflowError() + +def sleep(a: float) -> NoneType: pass + +def gmtime(*args, **kwargs) -> tuple: pass + +def asctime(*args, **kwargs) -> str: + raise ValueError() + +def clock() -> float: pass + +def localtime(*args, **kwargs) -> tuple: pass diff --git a/python2/zlib.py b/python2/zlib.py new file mode 100644 index 000000000..4da2260fb --- /dev/null +++ b/python2/zlib.py @@ -0,0 +1,28 @@ +# This is an autogenerated file. It serves as a starting point +# for a more percise manual annotation of this module. +# Feel free to edit the source below, but remove this header when you do. + +def compress(a: Nothing, *args, **kwargs) -> str: + raise MemoryError() + +def crc32(a: Nothing, *args, **kwargs) -> int: pass + +def compressobj(*args, **kwargs) -> object: + raise MemoryError() + raise ValueError() + +def adler32(a: Nothing, *args, **kwargs) -> int: pass + +def decompressobj(*args, **kwargs) -> object: + raise MemoryError() + raise ValueError() + +def decompress(a: Nothing, *args, **kwargs) -> str: + raise MemoryError() + + +class Decompress(object): + pass + +class Compress(object): + pass