Skip to content

Commit 021b162

Browse files
rowilliagvanrossum
authored andcommitted
Add stubs for werkzeug (#530)
1 parent 16c3af3 commit 021b162

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

+4917
-0
lines changed

third_party/2.7/werkzeug/__init__.pyi

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

third_party/2.7/werkzeug/_compat.pyi

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
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+
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+
imap = ... # type: Any
44+
izip = ... # type: Any
45+
ifilter = ... # type: Any
46+
47+
def to_unicode(x, charset=..., errors='', allow_none_charset=False): ...
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
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): ...
21+
22+
def _easteregg(app=None): ...
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)