diff --git a/python2/_bisect.py b/python2/_bisect.py index c7353924b..479b493b7 100644 --- a/python2/_bisect.py +++ b/python2/_bisect.py @@ -3,14 +3,16 @@ # for a more percise manual annotation of this module. # Feel free to edit the source below, but remove this header when you do. +from typing import List, Tuple, Dict, Undefined, GenericType + def bisect(a, x, *args, **kwargs) -> int: pass def bisect_left(a, x, *args, **kwargs) -> int: pass def bisect_right(a, x, *args, **kwargs) -> int: pass -def insort(a, x, *args, **kwargs) -> NoneType: pass +def insort(a, x, *args, **kwargs) -> None: pass -def insort_left(a, x, *args, **kwargs) -> NoneType: pass +def insort_left(a, x, *args, **kwargs) -> None: pass -def insort_right(a, x, *args, **kwargs) -> NoneType: pass +def insort_right(a, x, *args, **kwargs) -> None: pass diff --git a/python2/_codecs.py b/python2/_codecs.py index 3ac6412aa..bc8e7c768 100644 --- a/python2/_codecs.py +++ b/python2/_codecs.py @@ -3,6 +3,8 @@ # for a more percise manual annotation of this module. # Feel free to edit the source below, but remove this header when you do. +from typing import List, Tuple, Dict, Undefined, GenericType + def ascii_decode(a, *args, **kwargs) -> tuple: pass def ascii_encode(a, *args, **kwargs) -> tuple: pass @@ -37,9 +39,9 @@ def raw_unicode_escape_encode(a, *args, **kwargs) -> tuple: pass def readbuffer_encode(a, *args, **kwargs) -> tuple: pass -def register(*args, **kwargs) -> NoneType: pass +def register(*args, **kwargs) -> None: pass -def register_error(a: str, b) -> NoneType: pass +def register_error(a: str, b) -> None: pass def unicode_escape_decode(a, *args, **kwargs) -> tuple: pass diff --git a/python2/_collections.py b/python2/_collections.py index 8491809fe..154ad6691 100644 --- a/python2/_collections.py +++ b/python2/_collections.py @@ -3,6 +3,8 @@ # for a more percise manual annotation of this module. # Feel free to edit the source below, but remove this header when you do. +from typing import List, Tuple, Dict, Undefined, GenericType + class defaultdict(object): def __copy__() -> object: pass def __missing__(*args, **kwargs) -> object: @@ -15,22 +17,22 @@ class deque(object): def __reduce__() -> tuple: pass def __reversed__() -> object: pass def __sizeof__() -> long: pass - def append(*args, **kwargs) -> NoneType: pass - def appendleft(*args, **kwargs) -> NoneType: pass - def clear() -> NoneType: pass + def append(*args, **kwargs) -> None: pass + def appendleft(*args, **kwargs) -> None: pass + def clear() -> None: pass def count(*args, **kwargs) -> int: raise RuntimeError() - def extend(*args, **kwargs) -> NoneType: pass - def extendleft(*args, **kwargs) -> NoneType: pass + def extend(*args, **kwargs) -> None: pass + def extendleft(*args, **kwargs) -> None: pass def pop() -> object: raise IndexError() def popleft() -> object: raise IndexError() - def remove(*args, **kwargs) -> NoneType: - raise ValueError() + def remove(*args, **kwargs) -> None: raise IndexError() - def reverse() -> NoneType: pass - def rotate(*args, **kwargs) -> NoneType: pass + raise ValueError() + def reverse() -> None: pass + def rotate(*args, **kwargs) -> None: pass class deque_iterator(object): def __length_hint__() -> int: pass diff --git a/python2/_functools.py b/python2/_functools.py index 6108e9a31..9107076a8 100644 --- a/python2/_functools.py +++ b/python2/_functools.py @@ -3,10 +3,12 @@ # for a more percise manual annotation of this module. # Feel free to edit the source below, but remove this header when you do. +from typing import List, Tuple, Dict, Undefined, GenericType + def reduce(*args, **kwargs) -> object: raise TypeError() class partial(object): def __reduce__() -> tuple: pass - def __setstate__(a, b, c, d) -> NoneType: pass + def __setstate__(a, b, c, d) -> None: pass diff --git a/python2/_heapq.py b/python2/_heapq.py index f66445053..353205270 100644 --- a/python2/_heapq.py +++ b/python2/_heapq.py @@ -3,22 +3,24 @@ # for a more percise manual annotation of this module. # Feel free to edit the source below, but remove this header when you do. -def heapify(*args, **kwargs) -> NoneType: +from typing import List, Tuple, Dict, Undefined, GenericType + +def heapify(*args, **kwargs) -> None: raise TypeError() def heappop(*args, **kwargs) -> object: - raise TypeError() raise IndexError() + raise TypeError() -def heappush(*args, **kwargs) -> NoneType: +def heappush(*args, **kwargs) -> None: raise TypeError() def heappushpop(*args, **kwargs) -> object: raise TypeError() def heapreplace(*args, **kwargs) -> object: - raise TypeError() raise IndexError() + raise TypeError() def nlargest(a: int, b) -> List[object]: pass diff --git a/python2/_hotshot.py b/python2/_hotshot.py index c37133341..6d6cab049 100644 --- a/python2/_hotshot.py +++ b/python2/_hotshot.py @@ -3,11 +3,13 @@ # for a more percise manual annotation of this module. # Feel free to edit the source below, but remove this header when you do. +from typing import List, Tuple, Dict, Undefined, GenericType + def coverage(a: str) -> object: pass def logreader(a: str) -> LogReaderType: - raise RuntimeError() raise IOError() + raise RuntimeError() def profiler(a: str, *args, **kwargs) -> object: raise IOError() @@ -16,17 +18,17 @@ def resolution() -> tuple: pass class LogReaderType(object): - def close() -> NoneType: pass + def close() -> None: pass def fileno() -> int: raise ValueError() class ProfilerType(object): - def addinfo(a: str, b: str) -> NoneType: pass - def close() -> NoneType: pass + def addinfo(a: str, b: str) -> None: pass + def close() -> None: 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 + def start() -> None: pass + def stop() -> None: pass diff --git a/python2/_json.py b/python2/_json.py index c95321050..65f73da30 100644 --- a/python2/_json.py +++ b/python2/_json.py @@ -3,6 +3,8 @@ # for a more percise manual annotation of this module. # Feel free to edit the source below, but remove this header when you do. +from typing import List, Tuple, Dict, Undefined, GenericType + def encode_basestring_ascii(*args, **kwargs) -> str: raise TypeError() diff --git a/python2/_random.py b/python2/_random.py index b5510b643..86b730662 100644 --- a/python2/_random.py +++ b/python2/_random.py @@ -3,16 +3,18 @@ # for a more percise manual annotation of this module. # Feel free to edit the source below, but remove this header when you do. +from typing import List, Tuple, Dict, Undefined, GenericType + class Random(object): def getrandbits(a: int) -> object: - raise ValueError() raise MemoryError() + raise ValueError() def getstate() -> tuple: pass - def jumpahead(*args, **kwargs) -> NoneType: + def jumpahead(*args, **kwargs) -> None: raise TypeError() def random() -> float: pass - def seed(*args, **kwargs) -> NoneType: + def seed(*args, **kwargs) -> None: raise MemoryError() - def setstate(*args, **kwargs) -> NoneType: + def setstate(*args, **kwargs) -> None: raise TypeError() raise ValueError() diff --git a/python2/_sre.py b/python2/_sre.py index 0ca9201e2..158bd6ca9 100644 --- a/python2/_sre.py +++ b/python2/_sre.py @@ -3,6 +3,8 @@ # for a more percise manual annotation of this module. # Feel free to edit the source below, but remove this header when you do. +from typing import List, Tuple, Dict, Undefined, GenericType + CODESIZE = Undefined(int) MAGIC = Undefined(int) MAXREPEAT = Undefined(long) @@ -42,7 +44,7 @@ class SRE_Pattern(object): def match(pattern, *args, **kwargs) -> object: pass def scanner(a, *args, **kwargs) -> SRE_Scanner: pass def search(pattern, *args, **kwargs) -> object: pass - def split(source, *args, **kwargs) -> List[NoneType]: pass + def split(source, *args, **kwargs) -> List[None]: pass def sub(repl, string, *args, **kwargs) -> tuple: pass def subn(repl, string, *args, **kwargs) -> tuple: pass diff --git a/python2/_struct.py b/python2/_struct.py index 32712db9e..ec2f9cafb 100644 --- a/python2/_struct.py +++ b/python2/_struct.py @@ -3,14 +3,16 @@ # for a more percise manual annotation of this module. # Feel free to edit the source below, but remove this header when you do. -def _clearcache() -> NoneType: pass +from typing import List, Tuple, Dict, Undefined, GenericType + +def _clearcache() -> None: pass def calcsize(*args, **kwargs) -> int: pass def pack(*args, **kwargs) -> str: raise TypeError() -def pack_into(*args, **kwargs) -> NoneType: +def pack_into(*args, **kwargs) -> None: raise TypeError() def unpack(*args, **kwargs) -> tuple: pass @@ -22,6 +24,6 @@ def unpack_from(*args, **kwargs) -> tuple: class Struct(object): def __sizeof__() -> long: pass def pack(*args, **kwargs) -> str: pass - def pack_into(*args, **kwargs) -> NoneType: pass + def pack_into(*args, **kwargs) -> None: pass def unpack(a) -> tuple: pass def unpack_from(*args, **kwargs) -> tuple: pass diff --git a/python2/array.py b/python2/array.py index 7256b4ca9..3a194c979 100644 --- a/python2/array.py +++ b/python2/array.py @@ -3,51 +3,53 @@ # for a more percise manual annotation of this module. # Feel free to edit the source below, but remove this header when you do. +from typing import List, Tuple, Dict, Undefined, GenericType + class array(object): def __copy__() -> object: pass def __deepcopy__(*args, **kwargs) -> object: pass def __reduce__() -> tuple: raise AttributeError() def __sizeof__() -> long: pass - def append(*args, **kwargs) -> NoneType: pass + def append(*args, **kwargs) -> None: pass def buffer_info() -> tuple: pass - def byteswap() -> NoneType: + def byteswap() -> None: raise RuntimeError() def count(*args, **kwargs) -> int: pass - def extend(*args, **kwargs) -> NoneType: pass - def fromfile(a, b: int) -> NoneType: + def extend(*args, **kwargs) -> None: pass + def fromfile(a, b: int) -> None: raise EOFError() - raise TypeError() raise IOError() raise MemoryError() - def fromlist(*args, **kwargs) -> NoneType: raise TypeError() + def fromlist(*args, **kwargs) -> None: + raise MemoryError() + raise TypeError() + def fromstring(a) -> None: raise MemoryError() - def fromstring(a) -> NoneType: raise ValueError() + def fromunicode(a: str) -> None: raise MemoryError() - def fromunicode(a: str) -> NoneType: raise ValueError() - raise MemoryError() def index(*args, **kwargs) -> int: raise ValueError() - def insert(a: int, b) -> NoneType: pass + def insert(a: int, b) -> None: pass def pop(*args, **kwargs) -> object: raise IndexError() - def read(*args, **kwargs) -> NoneType: + def read(*args, **kwargs) -> None: raise DeprecationWarning() - def remove(*args, **kwargs) -> NoneType: + def remove(*args, **kwargs) -> None: raise ValueError() - def reverse() -> NoneType: pass - def tofile(*args, **kwargs) -> NoneType: - raise TypeError() + def reverse() -> None: pass + def tofile(*args, **kwargs) -> None: raise IOError() + raise TypeError() def tolist() -> list: pass def tostring() -> str: raise MemoryError() def tounicode() -> unicode: raise ValueError() - def write(*args, **kwargs) -> NoneType: + def write(*args, **kwargs) -> None: raise DeprecationWarning() class arrayiterator(object): diff --git a/python2/cStringIO.py b/python2/cStringIO.py index d946a0bbb..e7db949ed 100644 --- a/python2/cStringIO.py +++ b/python2/cStringIO.py @@ -3,6 +3,8 @@ # for a more percise manual annotation of this module. # Feel free to edit the source below, but remove this header when you do. +from typing import List, Tuple, Dict, Undefined, GenericType + InputType = Undefined(StringI) OutputType = Undefined(StringO) cStringIO_CAPI = Undefined(object) @@ -11,31 +13,31 @@ def StringIO(*args, **kwargs) -> object: pass class StringI(object): - def close() -> NoneType: pass - def flush() -> NoneType: pass + def close() -> None: pass + def flush() -> None: pass def getvalue(*args, **kwargs) -> str: pass def isatty() -> bool: pass def read(*args, **kwargs) -> str: pass def readline(*args, **kwargs) -> str: pass def readlines(*args, **kwargs) -> List[str]: pass - def reset() -> NoneType: pass - def seek(a: int, *args, **kwargs) -> NoneType: pass + def reset() -> None: pass + def seek(a: int, *args, **kwargs) -> None: pass def tell() -> int: pass - def truncate(*args, **kwargs) -> NoneType: + def truncate(*args, **kwargs) -> None: raise IOError() class StringO(object): - def close() -> NoneType: pass - def flush() -> NoneType: pass + def close() -> None: pass + def flush() -> None: pass def getvalue(*args, **kwargs) -> str: pass def isatty() -> bool: pass def read(*args, **kwargs) -> str: pass def readline(*args, **kwargs) -> str: pass def readlines(*args, **kwargs) -> List[str]: pass - def reset() -> NoneType: pass - def seek(a: int, *args, **kwargs) -> NoneType: pass + def reset() -> None: pass + def seek(a: int, *args, **kwargs) -> None: pass def tell() -> int: pass - def truncate(*args, **kwargs) -> NoneType: + def truncate(*args, **kwargs) -> None: raise IOError() - def write(a) -> NoneType: pass - def writelines(*args, **kwargs) -> NoneType: pass + def write(a) -> None: pass + def writelines(*args, **kwargs) -> None: pass diff --git a/python2/cmath.py b/python2/cmath.py index a578f6a47..9b1079f41 100644 --- a/python2/cmath.py +++ b/python2/cmath.py @@ -3,6 +3,8 @@ # for a more percise manual annotation of this module. # Feel free to edit the source below, but remove this header when you do. +from typing import List, Tuple, Dict, Undefined, GenericType + def acos(*args, **kwargs) -> complex: pass def acosh(*args, **kwargs) -> complex: pass diff --git a/python2/datetime.py b/python2/datetime.py index d5a7f77d0..c623aa133 100644 --- a/python2/datetime.py +++ b/python2/datetime.py @@ -3,6 +3,8 @@ # for a more percise manual annotation of this module. # Feel free to edit the source below, but remove this header when you do. +from typing import List, Tuple, Dict, Undefined, GenericType + max = Undefined(object) min = Undefined(object) resolution = Undefined(object) diff --git a/python2/gc.py b/python2/gc.py index 6002689bb..76864b55e 100644 --- a/python2/gc.py +++ b/python2/gc.py @@ -3,12 +3,14 @@ # for a more percise manual annotation of this module. # Feel free to edit the source below, but remove this header when you do. +from typing import List, Tuple, Dict, Undefined, GenericType + def collect(*args, **kwargs) -> int: raise ValueError() -def disable() -> NoneType: pass +def disable() -> None: pass -def enable() -> NoneType: pass +def enable() -> None: pass def get_count() -> tuple: pass @@ -26,6 +28,6 @@ def is_tracked(*args, **kwargs) -> bool: pass def isenabled() -> bool: pass -def set_debug(a: int) -> NoneType: pass +def set_debug(a: int) -> None: pass -def set_threshold(a: int, *args, **kwargs) -> NoneType: pass +def set_threshold(a: int, *args, **kwargs) -> None: pass diff --git a/python2/math.py b/python2/math.py index 03f436d07..ddff48e99 100644 --- a/python2/math.py +++ b/python2/math.py @@ -3,6 +3,8 @@ # for a more percise manual annotation of this module. # Feel free to edit the source below, but remove this header when you do. +from typing import List, Tuple, Dict, Undefined, GenericType + def acos(*args, **kwargs) -> float: pass def acosh(*args, **kwargs) -> float: pass diff --git a/python2/operator.py b/python2/operator.py index b2ad7e276..feaba57fe 100644 --- a/python2/operator.py +++ b/python2/operator.py @@ -3,6 +3,8 @@ # for a more percise manual annotation of this module. # Feel free to edit the source below, but remove this header when you do. +from typing import List, Tuple, Dict, Undefined, GenericType + def __abs__(*args, **kwargs) -> object: pass def __add__(*args, **kwargs) -> object: pass @@ -13,9 +15,9 @@ def __concat__(*args, **kwargs) -> object: pass def __contains__(*args, **kwargs) -> bool: pass -def __delitem__(*args, **kwargs) -> NoneType: pass +def __delitem__(*args, **kwargs) -> None: pass -def __delslice__(a, b: int, c: int) -> NoneType: pass +def __delslice__(a, b: int, c: int) -> None: pass def __div__(*args, **kwargs) -> object: pass @@ -93,9 +95,9 @@ def __repeat__(a, b: int) -> object: pass def __rshift__(*args, **kwargs) -> object: pass -def __setitem__(*args, **kwargs) -> NoneType: pass +def __setitem__(*args, **kwargs) -> None: pass -def __setslice__(a, b: int, c: int, d) -> NoneType: pass +def __setslice__(a, b: int, c: int, d) -> None: pass def __sub__(*args, **kwargs) -> object: pass @@ -115,9 +117,9 @@ def contains(*args, **kwargs) -> bool: pass def countOf(*args, **kwargs) -> int: pass -def delitem(*args, **kwargs) -> NoneType: pass +def delitem(*args, **kwargs) -> None: pass -def delslice(a, b: int, c: int) -> NoneType: pass +def delslice(a, b: int, c: int) -> None: pass def div(*args, **kwargs) -> object: pass @@ -211,9 +213,9 @@ def rshift(*args, **kwargs) -> object: pass def sequenceIncludes(*args, **kwargs) -> bool: pass -def setitem(*args, **kwargs) -> NoneType: pass +def setitem(*args, **kwargs) -> None: pass -def setslice(a, b: int, c: int, d) -> NoneType: pass +def setslice(a, b: int, c: int, d) -> None: pass def sub(*args, **kwargs) -> object: pass diff --git a/python2/signal.py b/python2/signal.py index d9fbb9ced..0a48aadaf 100644 --- a/python2/signal.py +++ b/python2/signal.py @@ -3,6 +3,8 @@ # for a more percise manual annotation of this module. # Feel free to edit the source below, but remove this header when you do. +from typing import List, Tuple, Dict, Undefined, GenericType + ITIMER_PROF = Undefined(long) ITIMER_REAL = Undefined(long) ITIMER_VIRTUAL = Undefined(long) @@ -53,21 +55,21 @@ def default_int_handler(*args, **kwargs) -> object: def getitimer(a: int) -> tuple: pass -def getsignal(a: int) -> NoneType: +def getsignal(a: int) -> None: raise ValueError() -def pause() -> NoneType: pass +def pause() -> None: pass def set_wakeup_fd(a: int) -> long: raise ValueError() def setitimer(a: int, b: float, *args, **kwargs) -> tuple: pass -def siginterrupt(a: int, b: int) -> NoneType: - raise ValueError() +def siginterrupt(a: int, b: int) -> None: raise RuntimeError() + raise ValueError() -def signal(a: int, b) -> NoneType: - raise TypeError() +def signal(a: int, b) -> None: raise RuntimeError() + raise TypeError() raise ValueError() diff --git a/python2/strop.py b/python2/strop.py index f024c99a2..33a361b6d 100644 --- a/python2/strop.py +++ b/python2/strop.py @@ -3,6 +3,8 @@ # for a more percise manual annotation of this module. # Feel free to edit the source below, but remove this header when you do. +from typing import List, Tuple, Dict, Undefined, GenericType + def atof(a: str) -> float: raise DeprecationWarning() raise ValueError() @@ -22,21 +24,21 @@ def count(*args, **kwargs) -> int: raise DeprecationWarning() def expandtabs(a, *args, **kwargs) -> str: - raise OverflowError() raise DeprecationWarning() + raise OverflowError() raise ValueError() def find(*args, **kwargs) -> int: raise DeprecationWarning() def join(*args, **kwargs) -> object: - raise OverflowError() raise DeprecationWarning() + raise OverflowError() raise TypeError() def joinfields(*args, **kwargs) -> object: - raise OverflowError() raise DeprecationWarning() + raise OverflowError() raise TypeError() def lower(*args, **kwargs) -> str: @@ -50,8 +52,8 @@ def maketrans(*args, **kwargs) -> str: def replace(*args, **kwargs) -> str: raise DeprecationWarning() - raise ValueError() raise MemoryError() + raise ValueError() def rfind(*args, **kwargs) -> int: raise DeprecationWarning() diff --git a/python2/thread.py b/python2/thread.py index 4ecd9b341..043f4285e 100644 --- a/python2/thread.py +++ b/python2/thread.py @@ -3,6 +3,8 @@ # for a more percise manual annotation of this module. # Feel free to edit the source below, but remove this header when you do. +from typing import List, Tuple, Dict, Undefined, GenericType + LockType = Undefined(lock) error = Undefined(object) @@ -20,18 +22,18 @@ def exit_thread() -> object: def get_ident() -> int: pass -def interrupt_main() -> NoneType: pass +def interrupt_main() -> None: pass def stack_size(*args, **kwargs) -> int: raise ValueError() def start_new(*args, **kwargs) -> int: - raise TypeError() raise MemoryError() + raise TypeError() def start_new_thread(*args, **kwargs) -> int: - raise TypeError() raise MemoryError() + raise TypeError() class _local(object): @@ -42,10 +44,10 @@ class _localdummy(object): class lock(object): def __enter__(*args, **kwargs) -> bool: pass - def __exit__(*args, **kwargs) -> NoneType: pass + def __exit__(*args, **kwargs) -> None: pass def acquire(*args, **kwargs) -> bool: pass def acquire_lock(*args, **kwargs) -> bool: pass def locked() -> bool: pass def locked_lock() -> bool: pass - def release() -> NoneType: pass - def release_lock() -> NoneType: pass + def release() -> None: pass + def release_lock() -> None: pass diff --git a/python2/time.py b/python2/time.py index 89f650b1d..b3209872b 100644 --- a/python2/time.py +++ b/python2/time.py @@ -3,6 +3,8 @@ # for a more percise manual annotation of this module. # Feel free to edit the source below, but remove this header when you do. +from typing import List, Tuple, Dict, Undefined, GenericType + def asctime(*args, **kwargs) -> str: raise ValueError() @@ -18,15 +20,15 @@ def localtime(*args, **kwargs) -> tuple: pass def mktime(*args, **kwargs) -> float: raise OverflowError() -def sleep(a: float) -> NoneType: pass +def sleep(a: float) -> None: pass def strftime(a: str, *args, **kwargs) -> str: - raise ValueError() raise MemoryError() + raise ValueError() def strptime(*args, **kwargs) -> object: pass def time() -> float: raise IOError() -def tzset() -> NoneType: pass +def tzset() -> None: pass diff --git a/python2/xxsubtype.py b/python2/xxsubtype.py index 63c6dbc8f..5b9f8be55 100644 --- a/python2/xxsubtype.py +++ b/python2/xxsubtype.py @@ -3,15 +3,17 @@ # for a more percise manual annotation of this module. # Feel free to edit the source below, but remove this header when you do. +from typing import List, Tuple, Dict, Undefined, GenericType + def bench(a, b: str, *args, **kwargs) -> float: pass class spamdict(object): def getstate() -> int: pass - def setstate(a: int) -> NoneType: pass + def setstate(a: int) -> None: pass class spamlist(object): def classmeth(*args, **kwargs) -> tuple: pass def getstate() -> int: pass - def setstate(a: int) -> NoneType: pass + def setstate(a: int) -> None: pass def staticmeth(*args, **kwargs) -> tuple: pass diff --git a/python2/zipimport.py b/python2/zipimport.py index 6bd79dfdf..9db82ae63 100644 --- a/python2/zipimport.py +++ b/python2/zipimport.py @@ -3,8 +3,10 @@ # for a more percise manual annotation of this module. # Feel free to edit the source below, but remove this header when you do. +from typing import List, Tuple, Dict, Undefined, GenericType + class zipimporter(object): - def find_module(a: str, *args, **kwargs) -> NoneType: pass + def find_module(a: str, *args, **kwargs) -> None: pass def get_code(a: str) -> object: pass def get_data(a: str) -> str: raise IOError() diff --git a/python2/zlib.py b/python2/zlib.py index 7cd558080..fbc6168f3 100644 --- a/python2/zlib.py +++ b/python2/zlib.py @@ -3,14 +3,16 @@ # for a more percise manual annotation of this module. # Feel free to edit the source below, but remove this header when you do. +from typing import List, Tuple, Dict, Undefined, GenericType + def adler32(a, *args, **kwargs) -> int: pass def compress(a, *args, **kwargs) -> str: raise MemoryError() def compressobj(*args, **kwargs) -> object: - raise ValueError() raise MemoryError() + raise ValueError() def crc32(a, *args, **kwargs) -> int: pass @@ -18,8 +20,8 @@ def decompress(a, *args, **kwargs) -> str: raise MemoryError() def decompressobj(*args, **kwargs) -> object: - raise ValueError() raise MemoryError() + raise ValueError() class Compress(object): diff --git a/python3/_bisect.py b/python3/_bisect.py index ba57e15fe..42a38e860 100644 --- a/python3/_bisect.py +++ b/python3/_bisect.py @@ -3,14 +3,16 @@ # for a more percise manual annotation of this module. # Feel free to edit the source below, but remove this header when you do. +from typing import List, Tuple, Dict, Undefined, GenericType + def bisect(a, x, *args, **kwargs) -> long: pass def bisect_left(a, x, *args, **kwargs) -> long: pass def bisect_right(a, x, *args, **kwargs) -> long: pass -def insort(a, x, *args, **kwargs) -> NoneType: pass +def insort(a, x, *args, **kwargs) -> None: pass -def insort_left(a, x, *args, **kwargs) -> NoneType: pass +def insort_left(a, x, *args, **kwargs) -> None: pass -def insort_right(a, x, *args, **kwargs) -> NoneType: pass +def insort_right(a, x, *args, **kwargs) -> None: pass diff --git a/python3/_codecs.py b/python3/_codecs.py index f060e79fe..c12a509ca 100644 --- a/python3/_codecs.py +++ b/python3/_codecs.py @@ -3,7 +3,9 @@ # for a more percise manual annotation of this module. # Feel free to edit the source below, but remove this header when you do. -def _forget_codec(a: str) -> NoneType: pass +from typing import List, Tuple, Dict, Undefined, GenericType + +def _forget_codec(a: str) -> None: pass def ascii_decode(a, *args, **kwargs) -> tuple: pass @@ -38,9 +40,9 @@ def raw_unicode_escape_encode(a, *args, **kwargs) -> tuple: pass def readbuffer_encode(a, *args, **kwargs) -> tuple: pass -def register(*args, **kwargs) -> NoneType: pass +def register(*args, **kwargs) -> None: pass -def register_error(a: str, b) -> NoneType: pass +def register_error(a: str, b) -> None: pass def unicode_escape_decode(a, *args, **kwargs) -> tuple: pass diff --git a/python3/_heapq.py b/python3/_heapq.py index f66445053..353205270 100644 --- a/python3/_heapq.py +++ b/python3/_heapq.py @@ -3,22 +3,24 @@ # for a more percise manual annotation of this module. # Feel free to edit the source below, but remove this header when you do. -def heapify(*args, **kwargs) -> NoneType: +from typing import List, Tuple, Dict, Undefined, GenericType + +def heapify(*args, **kwargs) -> None: raise TypeError() def heappop(*args, **kwargs) -> object: - raise TypeError() raise IndexError() + raise TypeError() -def heappush(*args, **kwargs) -> NoneType: +def heappush(*args, **kwargs) -> None: raise TypeError() def heappushpop(*args, **kwargs) -> object: raise TypeError() def heapreplace(*args, **kwargs) -> object: - raise TypeError() raise IndexError() + raise TypeError() def nlargest(a: int, b) -> List[object]: pass diff --git a/python3/_json.py b/python3/_json.py index 8aa75480d..eceaf7420 100644 --- a/python3/_json.py +++ b/python3/_json.py @@ -3,6 +3,8 @@ # for a more percise manual annotation of this module. # Feel free to edit the source below, but remove this header when you do. +from typing import List, Tuple, Dict, Undefined, GenericType + def encode_basestring_ascii(*args, **kwargs) -> object: raise TypeError() diff --git a/python3/_operator.py b/python3/_operator.py index 4db19ccc9..d74dd2f4a 100644 --- a/python3/_operator.py +++ b/python3/_operator.py @@ -3,9 +3,11 @@ # for a more percise manual annotation of this module. # Feel free to edit the source below, but remove this header when you do. +from typing import List, Tuple, Dict, Undefined, GenericType + def _compare_digest(a, b) -> bool: - raise TypeError() raise BufferError() + raise TypeError() def abs(*args, **kwargs) -> object: pass @@ -19,7 +21,7 @@ def contains(*args, **kwargs) -> bool: pass def countOf(*args, **kwargs) -> long: pass -def delitem(*args, **kwargs) -> NoneType: pass +def delitem(*args, **kwargs) -> None: pass def eq(*args, **kwargs) -> object: pass @@ -95,7 +97,7 @@ def pow(*args, **kwargs) -> object: pass def rshift(*args, **kwargs) -> object: pass -def setitem(*args, **kwargs) -> NoneType: pass +def setitem(*args, **kwargs) -> None: pass def sub(*args, **kwargs) -> object: pass diff --git a/python3/_stat.py b/python3/_stat.py index a4bfeb1f1..02cb9386a 100644 --- a/python3/_stat.py +++ b/python3/_stat.py @@ -3,6 +3,8 @@ # for a more percise manual annotation of this module. # Feel free to edit the source below, but remove this header when you do. +from typing import List, Tuple, Dict, Undefined, GenericType + def S_IFMT(*args, **kwargs) -> long: pass def S_IMODE(*args, **kwargs) -> long: pass diff --git a/python3/_tracemalloc.py b/python3/_tracemalloc.py index 626f60221..ae5bf26ba 100644 --- a/python3/_tracemalloc.py +++ b/python3/_tracemalloc.py @@ -3,12 +3,14 @@ # for a more percise manual annotation of this module. # Feel free to edit the source below, but remove this header when you do. +from typing import List, Tuple, Dict, Undefined, GenericType + def _get_object_traceback(*args, **kwargs) -> object: pass def _get_traces() -> object: raise MemoryError() -def clear_traces() -> NoneType: pass +def clear_traces() -> None: pass def get_traceback_limit() -> long: pass @@ -18,7 +20,7 @@ def get_tracemalloc_memory() -> object: pass def is_tracing() -> bool: pass -def start(*args, **kwargs) -> NoneType: +def start(*args, **kwargs) -> None: raise ValueError() -def stop() -> NoneType: pass +def stop() -> None: pass diff --git a/python3/_warnings.py b/python3/_warnings.py index d813020ef..811d1daaf 100644 --- a/python3/_warnings.py +++ b/python3/_warnings.py @@ -3,8 +3,10 @@ # for a more percise manual annotation of this module. # Feel free to edit the source below, but remove this header when you do. -def _filters_mutated() -> NoneType: pass +from typing import List, Tuple, Dict, Undefined, GenericType -def warn(message, *args, **kwargs) -> NoneType: pass +def _filters_mutated() -> None: pass -def warn_explicit(message, category, filename: str, lineno: int, *args, **kwargs) -> NoneType: pass +def warn(message, *args, **kwargs) -> None: pass + +def warn_explicit(message, category, filename: str, lineno: int, *args, **kwargs) -> None: pass diff --git a/python3/atexit.py b/python3/atexit.py index ec71a500c..a13dcf268 100644 --- a/python3/atexit.py +++ b/python3/atexit.py @@ -3,14 +3,16 @@ # for a more percise manual annotation of this module. # Feel free to edit the source below, but remove this header when you do. -def _clear() -> NoneType: pass +from typing import List, Tuple, Dict, Undefined, GenericType + +def _clear() -> None: pass def _ncallbacks() -> long: pass -def _run_exitfuncs() -> NoneType: pass +def _run_exitfuncs() -> None: pass def register(*args, **kwargs) -> object: - raise TypeError() raise MemoryError() + raise TypeError() -def unregister(*args, **kwargs) -> NoneType: pass +def unregister(*args, **kwargs) -> None: pass diff --git a/python3/cmath.py b/python3/cmath.py index de7f505cc..575111865 100644 --- a/python3/cmath.py +++ b/python3/cmath.py @@ -3,6 +3,8 @@ # for a more percise manual annotation of this module. # Feel free to edit the source below, but remove this header when you do. +from typing import List, Tuple, Dict, Undefined, GenericType + def acos(*args, **kwargs) -> complex: pass def acosh(*args, **kwargs) -> complex: pass diff --git a/python3/marshal.py b/python3/marshal.py index c3da994fb..e86aa8b45 100644 --- a/python3/marshal.py +++ b/python3/marshal.py @@ -3,6 +3,8 @@ # for a more percise manual annotation of this module. # Feel free to edit the source below, but remove this header when you do. +from typing import List, Tuple, Dict, Undefined, GenericType + def dump(a, b, *args, **kwargs) -> object: pass def dumps(a, *args, **kwargs) -> object: pass diff --git a/python3/math.py b/python3/math.py index 45f218ed7..f45edacbe 100644 --- a/python3/math.py +++ b/python3/math.py @@ -3,6 +3,8 @@ # for a more percise manual annotation of this module. # Feel free to edit the source below, but remove this header when you do. +from typing import List, Tuple, Dict, Undefined, GenericType + def acos(*args, **kwargs) -> object: pass def acosh(*args, **kwargs) -> object: pass diff --git a/python3/signal.py b/python3/signal.py index e9ececc38..ed9b9e3aa 100644 --- a/python3/signal.py +++ b/python3/signal.py @@ -3,6 +3,8 @@ # for a more percise manual annotation of this module. # Feel free to edit the source below, but remove this header when you do. +from typing import List, Tuple, Dict, Undefined, GenericType + ITIMER_PROF = Undefined(long) ITIMER_REAL = Undefined(long) ITIMER_VIRTUAL = Undefined(long) @@ -53,12 +55,12 @@ def default_int_handler(*args, **kwargs) -> object: def getitimer(a: int) -> tuple: pass -def getsignal(a: int) -> NoneType: +def getsignal(a: int) -> None: raise ValueError() -def pause() -> NoneType: pass +def pause() -> None: pass -def pthread_kill(a: int, b: int) -> NoneType: +def pthread_kill(a: int, b: int) -> None: raise OSError() def pthread_sigmask(a: int, b) -> object: @@ -69,21 +71,21 @@ def set_wakeup_fd(a: int) -> long: def setitimer(a: int, b: float, *args, **kwargs) -> tuple: pass -def siginterrupt(a: int, b: int) -> NoneType: - raise ValueError() +def siginterrupt(a: int, b: int) -> None: raise OSError() + raise ValueError() -def signal(a: int, b) -> NoneType: +def signal(a: int, b) -> None: + raise OSError() raise TypeError() raise ValueError() - raise OSError() def sigpending() -> object: raise OSError() def sigtimedwait(a, b) -> object: - raise ValueError() raise OSError() + raise ValueError() def sigwait(a) -> long: raise OSError() diff --git a/python3/time.py b/python3/time.py index e5f19088b..03056e388 100644 --- a/python3/time.py +++ b/python3/time.py @@ -3,6 +3,8 @@ # for a more percise manual annotation of this module. # Feel free to edit the source below, but remove this header when you do. +from typing import List, Tuple, Dict, Undefined, GenericType + def asctime(*args, **kwargs) -> unicode: pass def clock() -> float: pass @@ -13,7 +15,7 @@ def clock_getres(a: int) -> float: def clock_gettime(a: int) -> float: raise IOError() -def clock_settime(a: int, b) -> NoneType: +def clock_settime(a: int, b) -> None: raise IOError() def ctime(*args, **kwargs) -> unicode: pass @@ -35,7 +37,7 @@ def perf_counter() -> float: pass def process_time() -> float: pass -def sleep(a: float) -> NoneType: +def sleep(a: float) -> None: raise ValueError() def strftime(a: str, *args, **kwargs) -> unicode: @@ -45,4 +47,4 @@ def strptime(*args, **kwargs) -> object: pass def time() -> float: pass -def tzset() -> NoneType: pass +def tzset() -> None: pass