Skip to content

Commit 89677cb

Browse files
author
Roy Williams
committed
Add stubs for werkzeug
1 parent 16c3af3 commit 89677cb

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

78 files changed

+4887
-0
lines changed

third_party/2.7/werkzeug/__init__.pyi

Lines changed: 137 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,137 @@
1+
# Stubs for werkzeug (Python 2)
2+
#
3+
# NOTE: This dynamically typed stub was automatically generated by stubgen.
4+
5+
from types import ModuleType
6+
7+
8+
class module(ModuleType):
9+
def __getattr__(self, name): ...
10+
def __dir__(self): ...
11+
12+
13+
__version__ = ... # type: Any
14+
15+
run_simple = serving.run_simple
16+
test_app = testapp.test_app
17+
UserAgent = useragents.UserAgent
18+
_easteregg = _internal._easteregg
19+
DebuggedApplication = debug.DebuggedApplication
20+
MultiDict = datastructures.MultiDict
21+
CombinedMultiDict = datastructures.CombinedMultiDict
22+
Headers = datastructures.Headers
23+
EnvironHeaders = datastructures.EnvironHeaders
24+
ImmutableList = datastructures.ImmutableList
25+
ImmutableDict = datastructures.ImmutableDict
26+
ImmutableMultiDict = datastructures.ImmutableMultiDict
27+
TypeConversionDict = datastructures.TypeConversionDict
28+
ImmutableTypeConversionDict = datastructures.ImmutableTypeConversionDict
29+
Accept = datastructures.Accept
30+
MIMEAccept = datastructures.MIMEAccept
31+
CharsetAccept = datastructures.CharsetAccept
32+
LanguageAccept = datastructures.LanguageAccept
33+
RequestCacheControl = datastructures.RequestCacheControl
34+
ResponseCacheControl = datastructures.ResponseCacheControl
35+
ETags = datastructures.ETags
36+
HeaderSet = datastructures.HeaderSet
37+
WWWAuthenticate = datastructures.WWWAuthenticate
38+
Authorization = datastructures.Authorization
39+
FileMultiDict = datastructures.FileMultiDict
40+
CallbackDict = datastructures.CallbackDict
41+
FileStorage = datastructures.FileStorage
42+
OrderedMultiDict = datastructures.OrderedMultiDict
43+
ImmutableOrderedMultiDict = datastructures.ImmutableOrderedMultiDict
44+
escape = utils.escape
45+
environ_property = utils.environ_property
46+
append_slash_redirect = utils.append_slash_redirect
47+
redirect = utils.redirect
48+
cached_property = utils.cached_property
49+
import_string = utils.import_string
50+
dump_cookie = utils.dump_cookie
51+
parse_cookie = utils.parse_cookie
52+
unescape = utils.unescape
53+
format_string = utils.format_string
54+
find_modules = utils.find_modules
55+
header_property = utils.header_property
56+
html = utils.html
57+
xhtml = utils.xhtml
58+
HTMLBuilder = utils.HTMLBuilder
59+
validate_arguments = utils.validate_arguments
60+
ArgumentValidationError = utils.ArgumentValidationError
61+
bind_arguments = utils.bind_arguments
62+
secure_filename = utils.secure_filename
63+
BaseResponse = wrappers.BaseResponse
64+
BaseRequest = wrappers.BaseRequest
65+
Request = wrappers.Request
66+
Response = wrappers.Response
67+
AcceptMixin = wrappers.AcceptMixin
68+
ETagRequestMixin = wrappers.ETagRequestMixin
69+
ETagResponseMixin = wrappers.ETagResponseMixin
70+
ResponseStreamMixin = wrappers.ResponseStreamMixin
71+
CommonResponseDescriptorsMixin = wrappers.CommonResponseDescriptorsMixin
72+
UserAgentMixin = wrappers.UserAgentMixin
73+
AuthorizationMixin = wrappers.AuthorizationMixin
74+
WWWAuthenticateMixin = wrappers.WWWAuthenticateMixin
75+
CommonRequestDescriptorsMixin = wrappers.CommonRequestDescriptorsMixin
76+
Local = local.Local
77+
LocalManager = local.LocalManager
78+
LocalProxy = local.LocalProxy
79+
LocalStack = local.LocalStack
80+
release_local = local.release_local
81+
generate_password_hash = security.generate_password_hash
82+
check_password_hash = security.check_password_hash
83+
Client = test.Client
84+
EnvironBuilder = test.EnvironBuilder
85+
create_environ = test.create_environ
86+
run_wsgi_app = test.run_wsgi_app
87+
get_current_url = wsgi.get_current_url
88+
get_host = wsgi.get_host
89+
pop_path_info = wsgi.pop_path_info
90+
peek_path_info = wsgi.peek_path_info
91+
SharedDataMiddleware = wsgi.SharedDataMiddleware
92+
DispatcherMiddleware = wsgi.DispatcherMiddleware
93+
ClosingIterator = wsgi.ClosingIterator
94+
FileWrapper = wsgi.FileWrapper
95+
make_line_iter = wsgi.make_line_iter
96+
LimitedStream = wsgi.LimitedStream
97+
responder = wsgi.responder
98+
wrap_file = wsgi.wrap_file
99+
extract_path_info = wsgi.extract_path_info
100+
parse_etags = http.parse_etags
101+
parse_date = http.parse_date
102+
http_date = http.http_date
103+
cookie_date = http.cookie_date
104+
parse_cache_control_header = http.parse_cache_control_header
105+
is_resource_modified = http.is_resource_modified
106+
parse_accept_header = http.parse_accept_header
107+
parse_set_header = http.parse_set_header
108+
quote_etag = http.quote_etag
109+
unquote_etag = http.unquote_etag
110+
generate_etag = http.generate_etag
111+
dump_header = http.dump_header
112+
parse_list_header = http.parse_list_header
113+
parse_dict_header = http.parse_dict_header
114+
parse_authorization_header = http.parse_authorization_header
115+
parse_www_authenticate_header = http.parse_www_authenticate_header
116+
remove_entity_headers = http.remove_entity_headers
117+
is_entity_header = http.is_entity_header
118+
remove_hop_by_hop_headers = http.remove_hop_by_hop_headers
119+
parse_options_header = http.parse_options_header
120+
dump_options_header = http.dump_options_header
121+
is_hop_by_hop_header = http.is_hop_by_hop_header
122+
unquote_header_value = http.unquote_header_value
123+
quote_header_value = http.quote_header_value
124+
HTTP_STATUS_CODES = http.HTTP_STATUS_CODES
125+
url_decode = urls.url_decode
126+
url_encode = urls.url_encode
127+
url_quote = urls.url_quote
128+
url_quote_plus = urls.url_quote_plus
129+
url_unquote = urls.url_unquote
130+
url_unquote_plus = urls.url_unquote_plus
131+
url_fix = urls.url_fix
132+
Href = urls.Href
133+
iri_to_uri = urls.iri_to_uri
134+
uri_to_iri = urls.uri_to_iri
135+
parse_form_data = formparser.parse_form_data
136+
abort = exceptions.abort
137+
Aborter = exceptions.Aborter

third_party/2.7/werkzeug/_compat.pyi

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# Stubs for werkzeug._compat (Python 2)
2+
#
3+
# NOTE: This dynamically typed stub was automatically generated by stubgen.
4+
5+
from typing import Any
6+
from cStringIO import StringIO as BytesIO
7+
8+
PY2 = ... # type: Any
9+
WIN = ... # type: Any
10+
unichr = ... # type: Any
11+
text_type = ... # type: Any
12+
string_types = ... # type: Any
13+
integer_types = ... # type: Any
14+
iterkeys = ... # type: Any
15+
itervalues = ... # type: Any
16+
iteritems = ... # type: Any
17+
iterlists = ... # type: Any
18+
iterlistvalues = ... # type: Any
19+
int_to_byte = ... # type: Any
20+
iter_bytes = ... # type: Any
21+
22+
def fix_tuple_repr(obj): ...
23+
def implements_iterator(cls): ...
24+
def implements_to_string(cls): ...
25+
def native_string_result(func): ...
26+
def implements_bool(cls): ...
27+
28+
range_type = ... # type: Any
29+
NativeStringIO = ... # type: Any
30+
31+
def make_literal_wrapper(reference): ...
32+
def normalize_string_tuple(tup): ...
33+
def try_coerce_native(s): ...
34+
35+
wsgi_get_bytes = ... # type: Any
36+
37+
def wsgi_decoding_dance(s, charset='', errors=''): ...
38+
def wsgi_encoding_dance(s, charset='', errors=''): ...
39+
def to_bytes(x, charset=..., errors=''): ...
40+
def to_native(x, charset=..., errors=''): ...
41+
def reraise(tp, value, tb=None): ...
42+
43+
fix_tuple_repr = ... # type: Any
44+
implements_iterator = ... # type: Any
45+
implements_to_string = ... # type: Any
46+
implements_bool = ... # type: Any
47+
native_string_result = ... # type: Any
48+
imap = ... # type: Any
49+
izip = ... # type: Any
50+
ifilter = ... # type: Any
51+
try_coerce_native = ... # type: Any
52+
53+
def to_unicode(x, charset=..., errors='', allow_none_charset=False): ...
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Stubs for werkzeug._internal (Python 2)
2+
#
3+
# NOTE: This dynamically typed stub was automatically generated by stubgen.
4+
5+
from typing import Any
6+
7+
class _Missing:
8+
def __reduce__(self): ...
9+
10+
class _DictAccessorProperty:
11+
read_only = ... # type: Any
12+
name = ... # type: Any
13+
default = ... # type: Any
14+
load_func = ... # type: Any
15+
dump_func = ... # type: Any
16+
__doc__ = ... # type: Any
17+
def __init__(self, name, default=None, load_func=None, dump_func=None, read_only=None, doc=None): ...
18+
def __get__(self, obj, type=None): ...
19+
def __set__(self, obj, value): ...
20+
def __delete__(self, obj): ...
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Stubs for werkzeug._reloader (Python 2)
2+
#
3+
# NOTE: This dynamically typed stub was automatically generated by stubgen.
4+
5+
from typing import Any
6+
7+
class ReloaderLoop:
8+
name = ... # type: Any
9+
extra_files = ... # type: Any
10+
interval = ... # type: Any
11+
def __init__(self, extra_files=None, interval=1): ...
12+
def run(self): ...
13+
def restart_with_reloader(self): ...
14+
def trigger_reload(self, filename): ...
15+
def log_reload(self, filename): ...
16+
17+
class StatReloaderLoop(ReloaderLoop):
18+
name = ... # type: Any
19+
def run(self): ...
20+
21+
class WatchdogReloaderLoop(ReloaderLoop):
22+
observable_paths = ... # type: Any
23+
name = ... # type: Any
24+
observer_class = ... # type: Any
25+
event_handler = ... # type: Any
26+
should_reload = ... # type: Any
27+
def __init__(self, *args, **kwargs): ...
28+
def trigger_reload(self, filename): ...
29+
def run(self): ...
30+
31+
reloader_loops = ... # type: Any
32+
33+
def run_with_reloader(main_func, extra_files=None, interval=1, reloader_type=''): ...
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Stubs for werkzeug.contrib (Python 2)
2+
#
3+
# NOTE: This dynamically typed stub was automatically generated by stubgen.
4+
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# Stubs for werkzeug.contrib.atom (Python 2)
2+
#
3+
# NOTE: This dynamically typed stub was automatically generated by stubgen.
4+
5+
from typing import Any
6+
7+
XHTML_NAMESPACE = ... # type: Any
8+
9+
def format_iso8601(obj): ...
10+
11+
class AtomFeed:
12+
default_generator = ... # type: Any
13+
title = ... # type: Any
14+
title_type = ... # type: Any
15+
url = ... # type: Any
16+
feed_url = ... # type: Any
17+
id = ... # type: Any
18+
updated = ... # type: Any
19+
author = ... # type: Any
20+
icon = ... # type: Any
21+
logo = ... # type: Any
22+
rights = ... # type: Any
23+
rights_type = ... # type: Any
24+
subtitle = ... # type: Any
25+
subtitle_type = ... # type: Any
26+
generator = ... # type: Any
27+
links = ... # type: Any
28+
entries = ... # type: Any
29+
def __init__(self, title=None, entries=None, **kwargs): ...
30+
def add(self, *args, **kwargs): ...
31+
def generate(self): ...
32+
def to_string(self): ...
33+
def get_response(self): ...
34+
def __call__(self, environ, start_response): ...
35+
36+
class FeedEntry:
37+
title = ... # type: Any
38+
title_type = ... # type: Any
39+
content = ... # type: Any
40+
content_type = ... # type: Any
41+
url = ... # type: Any
42+
id = ... # type: Any
43+
updated = ... # type: Any
44+
summary = ... # type: Any
45+
summary_type = ... # type: Any
46+
author = ... # type: Any
47+
published = ... # type: Any
48+
rights = ... # type: Any
49+
links = ... # type: Any
50+
categories = ... # type: Any
51+
xml_base = ... # type: Any
52+
def __init__(self, title=None, content=None, feed_url=None, **kwargs): ...
53+
def generate(self): ...
54+
def to_string(self): ...
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
# Stubs for werkzeug.contrib.cache (Python 2)
2+
#
3+
# NOTE: This dynamically typed stub was automatically generated by stubgen.
4+
5+
from typing import Any
6+
7+
class BaseCache:
8+
default_timeout = ... # type: Any
9+
def __init__(self, default_timeout=300): ...
10+
def get(self, key): ...
11+
def delete(self, key): ...
12+
def get_many(self, *keys): ...
13+
def get_dict(self, *keys): ...
14+
def set(self, key, value, timeout=None): ...
15+
def add(self, key, value, timeout=None): ...
16+
def set_many(self, mapping, timeout=None): ...
17+
def delete_many(self, *keys): ...
18+
def has(self, key): ...
19+
def clear(self): ...
20+
def inc(self, key, delta=1): ...
21+
def dec(self, key, delta=1): ...
22+
23+
class NullCache(BaseCache): ...
24+
25+
class SimpleCache(BaseCache):
26+
clear = ... # type: Any
27+
def __init__(self, threshold=500, default_timeout=300): ...
28+
def get(self, key): ...
29+
def set(self, key, value, timeout=None): ...
30+
def add(self, key, value, timeout=None): ...
31+
def delete(self, key): ...
32+
def has(self, key): ...
33+
34+
class MemcachedCache(BaseCache):
35+
key_prefix = ... # type: Any
36+
def __init__(self, servers=None, default_timeout=300, key_prefix=None): ...
37+
def get(self, key): ...
38+
def get_dict(self, *keys): ...
39+
def add(self, key, value, timeout=None): ...
40+
def set(self, key, value, timeout=None): ...
41+
def get_many(self, *keys): ...
42+
def set_many(self, mapping, timeout=None): ...
43+
def delete(self, key): ...
44+
def delete_many(self, *keys): ...
45+
def has(self, key): ...
46+
def clear(self): ...
47+
def inc(self, key, delta=1): ...
48+
def dec(self, key, delta=1): ...
49+
def import_preferred_memcache_lib(self, servers): ...
50+
51+
GAEMemcachedCache = ... # type: Any
52+
53+
class RedisCache(BaseCache):
54+
key_prefix = ... # type: Any
55+
def __init__(self, host='', port=6379, password=None, db=0, default_timeout=300, key_prefix=None, **kwargs): ...
56+
def dump_object(self, value): ...
57+
def load_object(self, value): ...
58+
def get(self, key): ...
59+
def get_many(self, *keys): ...
60+
def set(self, key, value, timeout=None): ...
61+
def add(self, key, value, timeout=None): ...
62+
def set_many(self, mapping, timeout=None): ...
63+
def delete(self, key): ...
64+
def delete_many(self, *keys): ...
65+
def has(self, key): ...
66+
def clear(self): ...
67+
def inc(self, key, delta=1): ...
68+
def dec(self, key, delta=1): ...
69+
70+
class FileSystemCache(BaseCache):
71+
def __init__(self, cache_dir, threshold=500, default_timeout=300, mode=384): ...
72+
def clear(self): ...
73+
def get(self, key): ...
74+
def add(self, key, value, timeout=None): ...
75+
def set(self, key, value, timeout=None): ...
76+
def delete(self, key): ...
77+
def has(self, key): ...

0 commit comments

Comments
 (0)