Skip to content

Commit

Permalink
Add stubs for werkzeug (#530)
Browse files Browse the repository at this point in the history
  • Loading branch information
rowillia authored and gvanrossum committed Nov 28, 2016
1 parent 16c3af3 commit 021b162
Show file tree
Hide file tree
Showing 78 changed files with 4,917 additions and 0 deletions.
154 changes: 154 additions & 0 deletions third_party/2.7/werkzeug/__init__.pyi
Original file line number Diff line number Diff line change
@@ -0,0 +1,154 @@
# Stubs for werkzeug (Python 2)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.

from types import ModuleType

from typing import Any

from werkzeug import _internal
from werkzeug import datastructures
from werkzeug import debug
from werkzeug import exceptions
from werkzeug import formparser
from werkzeug import http
from werkzeug import local
from werkzeug import security
from werkzeug import serving
from werkzeug import test
from werkzeug import testapp
from werkzeug import urls
from werkzeug import useragents
from werkzeug import utils
from werkzeug import wsgi

class module(ModuleType):
def __getattr__(self, name): ...
def __dir__(self): ...


__version__ = ... # type: Any

run_simple = serving.run_simple
test_app = testapp.test_app
UserAgent = useragents.UserAgent
_easteregg = _internal._easteregg
DebuggedApplication = debug.DebuggedApplication
MultiDict = datastructures.MultiDict
CombinedMultiDict = datastructures.CombinedMultiDict
Headers = datastructures.Headers
EnvironHeaders = datastructures.EnvironHeaders
ImmutableList = datastructures.ImmutableList
ImmutableDict = datastructures.ImmutableDict
ImmutableMultiDict = datastructures.ImmutableMultiDict
TypeConversionDict = datastructures.TypeConversionDict
ImmutableTypeConversionDict = datastructures.ImmutableTypeConversionDict
Accept = datastructures.Accept
MIMEAccept = datastructures.MIMEAccept
CharsetAccept = datastructures.CharsetAccept
LanguageAccept = datastructures.LanguageAccept
RequestCacheControl = datastructures.RequestCacheControl
ResponseCacheControl = datastructures.ResponseCacheControl
ETags = datastructures.ETags
HeaderSet = datastructures.HeaderSet
WWWAuthenticate = datastructures.WWWAuthenticate
Authorization = datastructures.Authorization
FileMultiDict = datastructures.FileMultiDict
CallbackDict = datastructures.CallbackDict
FileStorage = datastructures.FileStorage
OrderedMultiDict = datastructures.OrderedMultiDict
ImmutableOrderedMultiDict = datastructures.ImmutableOrderedMultiDict
escape = utils.escape
environ_property = utils.environ_property
append_slash_redirect = utils.append_slash_redirect
redirect = utils.redirect
cached_property = utils.cached_property
import_string = utils.import_string
dump_cookie = http.dump_cookie
parse_cookie = http.parse_cookie
unescape = utils.unescape
format_string = utils.format_string
find_modules = utils.find_modules
header_property = utils.header_property
html = utils.html
xhtml = utils.xhtml
HTMLBuilder = utils.HTMLBuilder
validate_arguments = utils.validate_arguments
ArgumentValidationError = utils.ArgumentValidationError
bind_arguments = utils.bind_arguments
secure_filename = utils.secure_filename
BaseResponse = wrappers.BaseResponse
BaseRequest = wrappers.BaseRequest
Request = wrappers.Request
Response = wrappers.Response
AcceptMixin = wrappers.AcceptMixin
ETagRequestMixin = wrappers.ETagRequestMixin
ETagResponseMixin = wrappers.ETagResponseMixin
ResponseStreamMixin = wrappers.ResponseStreamMixin
CommonResponseDescriptorsMixin = wrappers.CommonResponseDescriptorsMixin
UserAgentMixin = wrappers.UserAgentMixin
AuthorizationMixin = wrappers.AuthorizationMixin
WWWAuthenticateMixin = wrappers.WWWAuthenticateMixin
CommonRequestDescriptorsMixin = wrappers.CommonRequestDescriptorsMixin
Local = local.Local
LocalManager = local.LocalManager
LocalProxy = local.LocalProxy
LocalStack = local.LocalStack
release_local = local.release_local
generate_password_hash = security.generate_password_hash
check_password_hash = security.check_password_hash
Client = test.Client
EnvironBuilder = test.EnvironBuilder
create_environ = test.create_environ
run_wsgi_app = test.run_wsgi_app
get_current_url = wsgi.get_current_url
get_host = wsgi.get_host
pop_path_info = wsgi.pop_path_info
peek_path_info = wsgi.peek_path_info
SharedDataMiddleware = wsgi.SharedDataMiddleware
DispatcherMiddleware = wsgi.DispatcherMiddleware
ClosingIterator = wsgi.ClosingIterator
FileWrapper = wsgi.FileWrapper
make_line_iter = wsgi.make_line_iter
LimitedStream = wsgi.LimitedStream
responder = wsgi.responder
wrap_file = wsgi.wrap_file
extract_path_info = wsgi.extract_path_info
parse_etags = http.parse_etags
parse_date = http.parse_date
http_date = http.http_date
cookie_date = http.cookie_date
parse_cache_control_header = http.parse_cache_control_header
is_resource_modified = http.is_resource_modified
parse_accept_header = http.parse_accept_header
parse_set_header = http.parse_set_header
quote_etag = http.quote_etag
unquote_etag = http.unquote_etag
generate_etag = http.generate_etag
dump_header = http.dump_header
parse_list_header = http.parse_list_header
parse_dict_header = http.parse_dict_header
parse_authorization_header = http.parse_authorization_header
parse_www_authenticate_header = http.parse_www_authenticate_header
remove_entity_headers = http.remove_entity_headers
is_entity_header = http.is_entity_header
remove_hop_by_hop_headers = http.remove_hop_by_hop_headers
parse_options_header = http.parse_options_header
dump_options_header = http.dump_options_header
is_hop_by_hop_header = http.is_hop_by_hop_header
unquote_header_value = http.unquote_header_value
quote_header_value = http.quote_header_value
HTTP_STATUS_CODES = http.HTTP_STATUS_CODES
url_decode = urls.url_decode
url_encode = urls.url_encode
url_quote = urls.url_quote
url_quote_plus = urls.url_quote_plus
url_unquote = urls.url_unquote
url_unquote_plus = urls.url_unquote_plus
url_fix = urls.url_fix
Href = urls.Href
iri_to_uri = urls.iri_to_uri
uri_to_iri = urls.uri_to_iri
parse_form_data = formparser.parse_form_data
abort = exceptions.Aborter
Aborter = exceptions.Aborter
47 changes: 47 additions & 0 deletions third_party/2.7/werkzeug/_compat.pyi
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# Stubs for werkzeug._compat (Python 2)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.

from typing import Any
import StringIO as BytesIO

PY2 = ... # type: Any
WIN = ... # type: Any
unichr = ... # type: Any
text_type = ... # type: Any
string_types = ... # type: Any
integer_types = ... # type: Any
iterkeys = ... # type: Any
itervalues = ... # type: Any
iteritems = ... # type: Any
iterlists = ... # type: Any
iterlistvalues = ... # type: Any
int_to_byte = ... # type: Any
iter_bytes = ... # type: Any

def fix_tuple_repr(obj): ...
def implements_iterator(cls): ...
def implements_to_string(cls): ...
def native_string_result(func): ...
def implements_bool(cls): ...

range_type = ... # type: Any
NativeStringIO = ... # type: Any

def make_literal_wrapper(reference): ...
def normalize_string_tuple(tup): ...
def try_coerce_native(s): ...

wsgi_get_bytes = ... # type: Any

def wsgi_decoding_dance(s, charset='', errors=''): ...
def wsgi_encoding_dance(s, charset='', errors=''): ...
def to_bytes(x, charset=..., errors=''): ...
def to_native(x, charset=..., errors=''): ...
def reraise(tp, value, tb=None): ...

imap = ... # type: Any
izip = ... # type: Any
ifilter = ... # type: Any

def to_unicode(x, charset=..., errors='', allow_none_charset=False): ...
22 changes: 22 additions & 0 deletions third_party/2.7/werkzeug/_internal.pyi
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Stubs for werkzeug._internal (Python 2)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.

from typing import Any

class _Missing:
def __reduce__(self): ...

class _DictAccessorProperty:
read_only = ... # type: Any
name = ... # type: Any
default = ... # type: Any
load_func = ... # type: Any
dump_func = ... # type: Any
__doc__ = ... # type: Any
def __init__(self, name, default=None, load_func=None, dump_func=None, read_only=None, doc=None): ...
def __get__(self, obj, type=None): ...
def __set__(self, obj, value): ...
def __delete__(self, obj): ...

def _easteregg(app=None): ...
33 changes: 33 additions & 0 deletions third_party/2.7/werkzeug/_reloader.pyi
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Stubs for werkzeug._reloader (Python 2)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.

from typing import Any

class ReloaderLoop:
name = ... # type: Any
extra_files = ... # type: Any
interval = ... # type: Any
def __init__(self, extra_files=None, interval=1): ...
def run(self): ...
def restart_with_reloader(self): ...
def trigger_reload(self, filename): ...
def log_reload(self, filename): ...

class StatReloaderLoop(ReloaderLoop):
name = ... # type: Any
def run(self): ...

class WatchdogReloaderLoop(ReloaderLoop):
observable_paths = ... # type: Any
name = ... # type: Any
observer_class = ... # type: Any
event_handler = ... # type: Any
should_reload = ... # type: Any
def __init__(self, *args, **kwargs): ...
def trigger_reload(self, filename): ...
def run(self): ...

reloader_loops = ... # type: Any

def run_with_reloader(main_func, extra_files=None, interval=1, reloader_type=''): ...
4 changes: 4 additions & 0 deletions third_party/2.7/werkzeug/contrib/__init__.pyi
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Stubs for werkzeug.contrib (Python 2)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.

54 changes: 54 additions & 0 deletions third_party/2.7/werkzeug/contrib/atom.pyi
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# Stubs for werkzeug.contrib.atom (Python 2)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.

from typing import Any

XHTML_NAMESPACE = ... # type: Any

def format_iso8601(obj): ...

class AtomFeed:
default_generator = ... # type: Any
title = ... # type: Any
title_type = ... # type: Any
url = ... # type: Any
feed_url = ... # type: Any
id = ... # type: Any
updated = ... # type: Any
author = ... # type: Any
icon = ... # type: Any
logo = ... # type: Any
rights = ... # type: Any
rights_type = ... # type: Any
subtitle = ... # type: Any
subtitle_type = ... # type: Any
generator = ... # type: Any
links = ... # type: Any
entries = ... # type: Any
def __init__(self, title=None, entries=None, **kwargs): ...
def add(self, *args, **kwargs): ...
def generate(self): ...
def to_string(self): ...
def get_response(self): ...
def __call__(self, environ, start_response): ...

class FeedEntry:
title = ... # type: Any
title_type = ... # type: Any
content = ... # type: Any
content_type = ... # type: Any
url = ... # type: Any
id = ... # type: Any
updated = ... # type: Any
summary = ... # type: Any
summary_type = ... # type: Any
author = ... # type: Any
published = ... # type: Any
rights = ... # type: Any
links = ... # type: Any
categories = ... # type: Any
xml_base = ... # type: Any
def __init__(self, title=None, content=None, feed_url=None, **kwargs): ...
def generate(self): ...
def to_string(self): ...
77 changes: 77 additions & 0 deletions third_party/2.7/werkzeug/contrib/cache.pyi
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
# Stubs for werkzeug.contrib.cache (Python 2)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.

from typing import Any

class BaseCache:
default_timeout = ... # type: Any
def __init__(self, default_timeout=300): ...
def get(self, key): ...
def delete(self, key): ...
def get_many(self, *keys): ...
def get_dict(self, *keys): ...
def set(self, key, value, timeout=None): ...
def add(self, key, value, timeout=None): ...
def set_many(self, mapping, timeout=None): ...
def delete_many(self, *keys): ...
def has(self, key): ...
def clear(self): ...
def inc(self, key, delta=1): ...
def dec(self, key, delta=1): ...

class NullCache(BaseCache): ...

class SimpleCache(BaseCache):
clear = ... # type: Any
def __init__(self, threshold=500, default_timeout=300): ...
def get(self, key): ...
def set(self, key, value, timeout=None): ...
def add(self, key, value, timeout=None): ...
def delete(self, key): ...
def has(self, key): ...

class MemcachedCache(BaseCache):
key_prefix = ... # type: Any
def __init__(self, servers=None, default_timeout=300, key_prefix=None): ...
def get(self, key): ...
def get_dict(self, *keys): ...
def add(self, key, value, timeout=None): ...
def set(self, key, value, timeout=None): ...
def get_many(self, *keys): ...
def set_many(self, mapping, timeout=None): ...
def delete(self, key): ...
def delete_many(self, *keys): ...
def has(self, key): ...
def clear(self): ...
def inc(self, key, delta=1): ...
def dec(self, key, delta=1): ...
def import_preferred_memcache_lib(self, servers): ...

GAEMemcachedCache = ... # type: Any

class RedisCache(BaseCache):
key_prefix = ... # type: Any
def __init__(self, host='', port=6379, password=None, db=0, default_timeout=300, key_prefix=None, **kwargs): ...
def dump_object(self, value): ...
def load_object(self, value): ...
def get(self, key): ...
def get_many(self, *keys): ...
def set(self, key, value, timeout=None): ...
def add(self, key, value, timeout=None): ...
def set_many(self, mapping, timeout=None): ...
def delete(self, key): ...
def delete_many(self, *keys): ...
def has(self, key): ...
def clear(self): ...
def inc(self, key, delta=1): ...
def dec(self, key, delta=1): ...

class FileSystemCache(BaseCache):
def __init__(self, cache_dir, threshold=500, default_timeout=300, mode=384): ...
def clear(self): ...
def get(self, key): ...
def add(self, key, value, timeout=None): ...
def set(self, key, value, timeout=None): ...
def delete(self, key): ...
def has(self, key): ...
Loading

0 comments on commit 021b162

Please sign in to comment.