Skip to content

Commit 61dcf72

Browse files
author
Roy Williams
committed
Fix autogenerated stubs
1 parent 895033c commit 61dcf72

30 files changed

+109
-79
lines changed

third_party/2.7/werkzeug/__init__.pyi

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,23 @@
44

55
from types import ModuleType
66

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
724

825
class module(ModuleType):
926
def __getattr__(self, name): ...
@@ -47,8 +64,8 @@ append_slash_redirect = utils.append_slash_redirect
4764
redirect = utils.redirect
4865
cached_property = utils.cached_property
4966
import_string = utils.import_string
50-
dump_cookie = utils.dump_cookie
51-
parse_cookie = utils.parse_cookie
67+
dump_cookie = http.dump_cookie
68+
parse_cookie = http.parse_cookie
5269
unescape = utils.unescape
5370
format_string = utils.format_string
5471
find_modules = utils.find_modules
@@ -133,5 +150,5 @@ Href = urls.Href
133150
iri_to_uri = urls.iri_to_uri
134151
uri_to_iri = urls.uri_to_iri
135152
parse_form_data = formparser.parse_form_data
136-
abort = exceptions.abort
153+
abort = exceptions.Aborter
137154
Aborter = exceptions.Aborter

third_party/2.7/werkzeug/_compat.pyi

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# NOTE: This dynamically typed stub was automatically generated by stubgen.
44

55
from typing import Any
6-
from cStringIO import StringIO as BytesIO
6+
import StringIO as BytesIO
77

88
PY2 = ... # type: Any
99
WIN = ... # type: Any
@@ -40,14 +40,8 @@ def to_bytes(x, charset=..., errors=''): ...
4040
def to_native(x, charset=..., errors=''): ...
4141
def reraise(tp, value, tb=None): ...
4242

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
4843
imap = ... # type: Any
4944
izip = ... # type: Any
5045
ifilter = ... # type: Any
51-
try_coerce_native = ... # type: Any
5246

5347
def to_unicode(x, charset=..., errors='', allow_none_charset=False): ...

third_party/2.7/werkzeug/_internal.pyi

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,5 @@ class _DictAccessorProperty:
1818
def __get__(self, obj, type=None): ...
1919
def __set__(self, obj, value): ...
2020
def __delete__(self, obj): ...
21+
22+
def _easteregg(app=None): ...

third_party/2.7/werkzeug/contrib/testtools.pyi

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,7 @@ from werkzeug.wrappers import Response
77

88
class ContentAccessors:
99
def xml(self): ...
10-
xml = ... # type: Any
1110
def lxml(self): ...
12-
lxml = ... # type: Any
1311
def json(self): ...
14-
json = ... # type: Any
1512

1613
class TestResponse(Response, ContentAccessors): ...

third_party/2.7/werkzeug/datastructures.pyi

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
# NOTE: This dynamically typed stub was automatically generated by stubgen.
44

55
from typing import Any
6+
from collections import Container, Iterable, Mapping, MutableSet
67

78
def is_immutable(self): ...
89
def iter_multi_items(mapping): ...
@@ -29,7 +30,7 @@ class ImmutableList(ImmutableListMixin, list): ...
2930

3031
class ImmutableDictMixin:
3132
@classmethod
32-
def fromkeys(cls, keys, value=None): ...
33+
def fromkeys(cls, *args, **kwargs): ...
3334
def __reduce_ex__(self, protocol): ...
3435
def __hash__(self): ...
3536
def setdefault(self, key, default=None): ...
@@ -66,6 +67,10 @@ class ImmutableTypeConversionDict(ImmutableDictMixin, TypeConversionDict):
6667
def copy(self): ...
6768
def __copy__(self): ...
6869

70+
class ViewItems:
71+
def __init__(self, multi_dict, method, repr_name, *a, **kw): ...
72+
def __iter__(self): ...
73+
6974
class MultiDict(TypeConversionDict):
7075
def __init__(self, mapping=None): ...
7176
def __getitem__(self, key): ...
@@ -124,7 +129,7 @@ class OrderedMultiDict(MultiDict):
124129
def popitem(self): ...
125130
def popitemlist(self): ...
126131

127-
class Headers:
132+
class Headers(Mapping):
128133
def __init__(self, defaults=None): ...
129134
def __getitem__(self, key, _get_mode=False): ...
130135
def __eq__(self, other): ...
@@ -138,7 +143,7 @@ class Headers:
138143
def extend(self, iterable): ...
139144
def __delitem__(self, key, _index_operation=True): ...
140145
def remove(self, key): ...
141-
def pop(self, key=None, default=...): ...
146+
def pop(self, **kwargs): ...
142147
def popitem(self): ...
143148
def __contains__(self, key): ...
144149
has_key = ... # type: Any
@@ -156,15 +161,15 @@ class Headers:
156161
def __copy__(self): ...
157162

158163
class ImmutableHeadersMixin:
159-
def __delitem__(self, key): ...
164+
def __delitem__(self, key, **kwargs): ...
160165
def __setitem__(self, key, value): ...
161166
set = ... # type: Any
162-
def add(self, item): ...
167+
def add(self, *args, **kwargs): ...
163168
remove = ... # type: Any
164169
add_header = ... # type: Any
165170
def extend(self, iterable): ...
166171
def insert(self, pos, value): ...
167-
def pop(self, index=-1): ...
172+
def pop(self, **kwargs): ...
168173
def popitem(self): ...
169174
def setdefault(self, key, default): ...
170175

@@ -267,7 +272,7 @@ class CallbackDict(UpdateDictMixin, dict):
267272
on_update = ... # type: Any
268273
def __init__(self, initial=None, on_update=None): ...
269274

270-
class HeaderSet:
275+
class HeaderSet(MutableSet):
271276
on_update = ... # type: Any
272277
def __init__(self, headers=None, on_update=None): ...
273278
def add(self, header): ...
@@ -287,7 +292,7 @@ class HeaderSet:
287292
def __iter__(self): ...
288293
def __nonzero__(self): ...
289294

290-
class ETags:
295+
class ETags(Container, Iterable):
291296
star_tag = ... # type: Any
292297
def __init__(self, strong_etags=None, weak_etags=None, star_tag=False): ...
293298
def as_set(self, include_weak=False): ...
@@ -315,6 +320,7 @@ class Range:
315320
def range_for_length(self, length): ...
316321
def make_content_range(self, length): ...
317322
def to_header(self): ...
323+
def to_content_range_header(self, length): ...
318324

319325
class ContentRange:
320326
on_update = ... # type: Any
@@ -350,6 +356,7 @@ class WWWAuthenticate(UpdateDictMixin, dict):
350356
def set_basic(self, realm=''): ...
351357
def set_digest(self, realm, nonce, qop=..., opaque=None, algorithm=None, stale=False): ...
352358
def to_header(self): ...
359+
@staticmethod
353360
def auth_property(name, doc=None): ...
354361
type = ... # type: Any
355362
realm = ... # type: Any
@@ -359,7 +366,6 @@ class WWWAuthenticate(UpdateDictMixin, dict):
359366
algorithm = ... # type: Any
360367
qop = ... # type: Any
361368
stale = ... # type: Any
362-
auth_property = ... # type: Any
363369

364370
class FileStorage:
365371
name = ... # type: Any

third_party/2.7/werkzeug/debug/console.pyi

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,12 @@ class HTMLStringO:
1717
def writelines(self, x): ...
1818

1919
class ThreadedStream:
20+
@staticmethod
2021
def push(): ...
21-
push = ... # type: Any
22+
@staticmethod
2223
def fetch(): ...
23-
fetch = ... # type: Any
24+
@staticmethod
2425
def displayhook(obj): ...
25-
displayhook = ... # type: Any
2626
def __setattr__(self, name, value): ...
2727
def __dir__(self): ...
2828
def __getattribute__(self, name): ...

third_party/2.7/werkzeug/debug/tbtools.pyi

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ class Line:
2424
current = ... # type: Any
2525
def __init__(self, lineno, code): ...
2626
def classes(self): ...
27-
classes = ... # type: Any
2827
def render(self): ...
2928

3029
class Traceback:
@@ -35,16 +34,13 @@ class Traceback:
3534
def __init__(self, exc_type, exc_value, tb): ...
3635
def filter_hidden_frames(self): ...
3736
def is_syntax_error(self): ...
38-
is_syntax_error = ... # type: Any
3937
def exception(self): ...
40-
exception = ... # type: Any
4138
def log(self, logfile=None): ...
4239
def paste(self): ...
4340
def render_summary(self, include_title=True): ...
4441
def render_full(self, evalex=False, secret=None, evalex_trusted=True): ...
4542
def generate_plaintext_traceback(self): ...
4643
def plaintext(self): ...
47-
plaintext = ... # type: Any
4844
id = ... # type: Any
4945

5046
class Frame:

third_party/2.7/werkzeug/http.pyi

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
from typing import Any
66
from urllib2 import parse_http_list as _parse_list_header
7-
from urllib.request import parse_http_list as _parse_list_header
87

98
HTTP_STATUS_CODES = ... # type: Any
109

third_party/2.7/werkzeug/local.pyi

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
# NOTE: This dynamically typed stub was automatically generated by stubgen.
44

55
from typing import Any
6-
from greenlet import getcurrent as get_ident
76

87
def release_local(local): ...
98

third_party/2.7/werkzeug/posixemulation.pyi

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,3 @@ from .filesystem import get_filesystem_encoding as get_filesystem_encoding
99
can_rename_open_file = ... # type: Any
1010

1111
def rename(src, dst): ...
12-
13-
rename = ... # type: Any

0 commit comments

Comments
 (0)