From e2dde66eb19a95dba17d9478c40fe00b7a671ef4 Mon Sep 17 00:00:00 2001 From: Ben Darnell Date: Sun, 10 Apr 2016 20:10:35 -0400 Subject: [PATCH] Stubgen assorted stdlib modules --- stdlib/3/hmac.pyi | 27 ++++++++++++++++++++ stdlib/3/http/cookies.pyi | 46 ++++++++++++++++++++++++++++++++++ stdlib/3/mimetypes.pyi | 26 +++++++++++++++++++ stdlib/3/runpy.pyi | 21 ++++++++++++++++ stdlib/3/wsgiref/__init__.pyi | 0 stdlib/3/wsgiref/validate.pyi | 47 +++++++++++++++++++++++++++++++++++ 6 files changed, 167 insertions(+) create mode 100644 stdlib/3/hmac.pyi create mode 100644 stdlib/3/http/cookies.pyi create mode 100644 stdlib/3/mimetypes.pyi create mode 100644 stdlib/3/runpy.pyi create mode 100644 stdlib/3/wsgiref/__init__.pyi create mode 100644 stdlib/3/wsgiref/validate.pyi diff --git a/stdlib/3/hmac.pyi b/stdlib/3/hmac.pyi new file mode 100644 index 000000000..4c7972bb0 --- /dev/null +++ b/stdlib/3/hmac.pyi @@ -0,0 +1,27 @@ +# Stubs for hmac (Python 3.5) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from typing import Any +from _operator import _compare_digest as compare_digest + +trans_5C = ... # type: Any +trans_36 = ... # type: Any +digest_size = ... # type: Any + +class HMAC: + blocksize = ... # type: Any + digest_cons = ... # type: Any + outer = ... # type: Any + inner = ... # type: Any + digest_size = ... # type: Any + block_size = ... # type: Any + def __init__(self, key, msg=None, digestmod=None): ... + @property + def name(self): ... + def update(self, msg): ... + def copy(self): ... + def digest(self): ... + def hexdigest(self): ... + +def new(key, msg=None, digestmod=None): ... diff --git a/stdlib/3/http/cookies.pyi b/stdlib/3/http/cookies.pyi new file mode 100644 index 000000000..e7e785546 --- /dev/null +++ b/stdlib/3/http/cookies.pyi @@ -0,0 +1,46 @@ +# Stubs for http.cookies (Python 3.5) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from typing import Any + +class CookieError(Exception): ... + +class Morsel(dict): + def __init__(self): ... + @property + def key(self): ... + @key.setter + def key(self, key): ... + @property + def value(self): ... + @value.setter + def value(self, value): ... + @property + def coded_value(self): ... + @coded_value.setter + def coded_value(self, coded_value): ... + def __setitem__(self, K, V): ... + def setdefault(self, key, val=None): ... + def __eq__(self, morsel): ... + __ne__ = ... # type: Any + def copy(self): ... + def update(self, values): ... + def isReservedKey(self, K): ... + def set(self, key, val, coded_val, LegalChars=...): ... + def output(self, attrs=None, header=''): ... + def js_output(self, attrs=None): ... + def OutputString(self, attrs=None): ... + +class BaseCookie(dict): + def value_decode(self, val): ... + def value_encode(self, val): ... + def __init__(self, input=None): ... + def __setitem__(self, key, value): ... + def output(self, attrs=None, header='', sep=''): ... + def js_output(self, attrs=None): ... + def load(self, rawdata): ... + +class SimpleCookie(BaseCookie): + def value_decode(self, val): ... + def value_encode(self, val): ... diff --git a/stdlib/3/mimetypes.pyi b/stdlib/3/mimetypes.pyi new file mode 100644 index 000000000..a0144475b --- /dev/null +++ b/stdlib/3/mimetypes.pyi @@ -0,0 +1,26 @@ +# Stubs for mimetypes (Python 3.5) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from typing import Any + +class MimeTypes: + encodings_map = ... # type: Any + suffix_map = ... # type: Any + types_map = ... # type: Any + types_map_inv = ... # type: Any + def __init__(self, filenames=..., strict=True): ... + def add_type(self, type, ext, strict=True): ... + def guess_type(self, url, strict=True): ... + def guess_all_extensions(self, type, strict=True): ... + def guess_extension(self, type, strict=True): ... + def read(self, filename, strict=True): ... + def readfp(self, fp, strict=True): ... + def read_windows_registry(self, strict=True): ... + +def guess_type(url, strict=True): ... +def guess_all_extensions(type, strict=True): ... +def guess_extension(type, strict=True): ... +def add_type(type, ext, strict=True): ... +def init(files=None): ... +def read_mime_types(file): ... diff --git a/stdlib/3/runpy.pyi b/stdlib/3/runpy.pyi new file mode 100644 index 000000000..f7c257a99 --- /dev/null +++ b/stdlib/3/runpy.pyi @@ -0,0 +1,21 @@ +# Stubs for runpy (Python 3.5) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from typing import Any + +class _TempModule: + mod_name = ... # type: Any + module = ... # type: Any + def __init__(self, mod_name): ... + def __enter__(self): ... + def __exit__(self, *args): ... + +class _ModifiedArgv0: + value = ... # type: Any + def __init__(self, value): ... + def __enter__(self): ... + def __exit__(self, *args): ... + +def run_module(mod_name, init_globals=None, run_name=None, alter_sys=False): ... +def run_path(path_name, init_globals=None, run_name=None): ... diff --git a/stdlib/3/wsgiref/__init__.pyi b/stdlib/3/wsgiref/__init__.pyi new file mode 100644 index 000000000..e69de29bb diff --git a/stdlib/3/wsgiref/validate.pyi b/stdlib/3/wsgiref/validate.pyi new file mode 100644 index 000000000..ecdb2528c --- /dev/null +++ b/stdlib/3/wsgiref/validate.pyi @@ -0,0 +1,47 @@ +# Stubs for wsgiref.validate (Python 3.5) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from typing import Any + +class WSGIWarning(Warning): ... + +def validator(application): ... + +class InputWrapper: + input = ... # type: Any + def __init__(self, wsgi_input): ... + def read(self, *args): ... + def readline(self, *args): ... + def readlines(self, *args): ... + def __iter__(self): ... + def close(self): ... + +class ErrorWrapper: + errors = ... # type: Any + def __init__(self, wsgi_errors): ... + def write(self, s): ... + def flush(self): ... + def writelines(self, seq): ... + def close(self): ... + +class WriteWrapper: + writer = ... # type: Any + def __init__(self, wsgi_writer): ... + def __call__(self, s): ... + +class PartialIteratorWrapper: + iterator = ... # type: Any + def __init__(self, wsgi_iterator): ... + def __iter__(self): ... + +class IteratorWrapper: + original_iterator = ... # type: Any + iterator = ... # type: Any + closed = ... # type: Any + check_start_response = ... # type: Any + def __init__(self, wsgi_iterator, check_start_response): ... + def __iter__(self): ... + def __next__(self): ... + def close(self): ... + def __del__(self): ...